Class SecurityCenterClient (2.37.0)

public class SecurityCenterClient implements BackgroundResource

Service Description: V1 APIs for Security Center service.

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


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsSettingsName parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
   SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
       SecurityHealthAnalyticsCustomModule.newBuilder().build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.createSecurityHealthAnalyticsCustomModule(
           parent, securityHealthAnalyticsCustomModule);
 }
 

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

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns 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 SecurityCenterSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecurityCenterSettings securityCenterSettings =
     SecurityCenterSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecurityCenterSettings securityCenterSettings =
     SecurityCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
 SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
 

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


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecurityCenterSettings securityCenterSettings =
     SecurityCenterSettings.newHttpJsonBuilder().build();
 SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
 

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

Inheritance

java.lang.Object > SecurityCenterClient

Implements

BackgroundResource

Static Methods

create()

public static final SecurityCenterClient create()

Constructs an instance of SecurityCenterClient with default settings.

Returns
TypeDescription
SecurityCenterClient
Exceptions
TypeDescription
IOException

create(SecurityCenterSettings settings)

public static final SecurityCenterClient create(SecurityCenterSettings settings)

Constructs an instance of SecurityCenterClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsSecurityCenterSettings
Returns
TypeDescription
SecurityCenterClient
Exceptions
TypeDescription
IOException

create(SecurityCenterStub stub)

public static final SecurityCenterClient create(SecurityCenterStub stub)

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

Parameter
NameDescription
stubSecurityCenterStub
Returns
TypeDescription
SecurityCenterClient

Constructors

SecurityCenterClient(SecurityCenterSettings settings)

protected SecurityCenterClient(SecurityCenterSettings settings)

Constructs an instance of SecurityCenterClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsSecurityCenterSettings

SecurityCenterClient(SecurityCenterStub stub)

protected SecurityCenterClient(SecurityCenterStub stub)
Parameter
NameDescription
stubSecurityCenterStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

bulkMuteFindingsAsync(ResourceName parent)

public final OperationFuture<BulkMuteFindingsResponse,Empty> bulkMuteFindingsAsync(ResourceName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ResourceName parent = FolderName.of("[FOLDER]");
   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
 }
 
Parameter
NameDescription
parentcom.google.api.resourcenames.ResourceName

Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
OperationFuture<BulkMuteFindingsResponse,Empty>

bulkMuteFindingsAsync(BulkMuteFindingsRequest request)

public final OperationFuture<BulkMuteFindingsResponse,Empty> bulkMuteFindingsAsync(BulkMuteFindingsRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   BulkMuteFindingsRequest request =
       BulkMuteFindingsRequest.newBuilder()
           .setParent(FolderName.of("[FOLDER]").toString())
           .setFilter("filter-1274492040")
           .setMuteAnnotation("muteAnnotation-2111042008")
           .build();
   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(request).get();
 }
 
Parameter
NameDescription
requestBulkMuteFindingsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<BulkMuteFindingsResponse,Empty>

bulkMuteFindingsAsync(String parent)

public final OperationFuture<BulkMuteFindingsResponse,Empty> bulkMuteFindingsAsync(String parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = FolderName.of("[FOLDER]").toString();
   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
 }
 
Parameter
NameDescription
parentString

Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
OperationFuture<BulkMuteFindingsResponse,Empty>

bulkMuteFindingsCallable()

public final UnaryCallable<BulkMuteFindingsRequest,Operation> bulkMuteFindingsCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   BulkMuteFindingsRequest request =
       BulkMuteFindingsRequest.newBuilder()
           .setParent(FolderName.of("[FOLDER]").toString())
           .setFilter("filter-1274492040")
           .setMuteAnnotation("muteAnnotation-2111042008")
           .build();
   ApiFuture<Operation> future =
       securityCenterClient.bulkMuteFindingsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<BulkMuteFindingsRequest,Operation>

bulkMuteFindingsOperationCallable()

public final OperationCallable<BulkMuteFindingsRequest,BulkMuteFindingsResponse,Empty> bulkMuteFindingsOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   BulkMuteFindingsRequest request =
       BulkMuteFindingsRequest.newBuilder()
           .setParent(FolderName.of("[FOLDER]").toString())
           .setFilter("filter-1274492040")
           .setMuteAnnotation("muteAnnotation-2111042008")
           .build();
   OperationFuture<BulkMuteFindingsResponse, Empty> future =
       securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request);
   // Do something.
   BulkMuteFindingsResponse response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<BulkMuteFindingsRequest,BulkMuteFindingsResponse,Empty>

close()

public final void close()

createBigQueryExport(CreateBigQueryExportRequest request)

public final BigQueryExport createBigQueryExport(CreateBigQueryExportRequest request)

Creates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateBigQueryExportRequest request =
       CreateBigQueryExportRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setBigQueryExport(BigQueryExport.newBuilder().build())
           .setBigQueryExportId("bigQueryExportId1024198583")
           .build();
   BigQueryExport response = securityCenterClient.createBigQueryExport(request);
 }
 
Parameter
NameDescription
requestCreateBigQueryExportRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
BigQueryExport

createBigQueryExport(FolderName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

public final BigQueryExport createBigQueryExport(FolderName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

Creates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
   String bigQueryExportId = "bigQueryExportId1024198583";
   BigQueryExport response =
       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
 }
 
Parameters
NameDescription
parentFolderName

Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

bigQueryExportBigQueryExport

Required. The BigQuery export being created.

bigQueryExportIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
BigQueryExport

createBigQueryExport(OrganizationName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

public final BigQueryExport createBigQueryExport(OrganizationName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

Creates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
   String bigQueryExportId = "bigQueryExportId1024198583";
   BigQueryExport response =
       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
 }
 
Parameters
NameDescription
parentOrganizationName

Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

bigQueryExportBigQueryExport

Required. The BigQuery export being created.

bigQueryExportIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
BigQueryExport

createBigQueryExport(ProjectName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

public final BigQueryExport createBigQueryExport(ProjectName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

Creates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
   String bigQueryExportId = "bigQueryExportId1024198583";
   BigQueryExport response =
       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
 }
 
Parameters
NameDescription
parentProjectName

Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

bigQueryExportBigQueryExport

Required. The BigQuery export being created.

bigQueryExportIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
BigQueryExport

createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId)

public final BigQueryExport createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId)

Creates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
   String bigQueryExportId = "bigQueryExportId1024198583";
   BigQueryExport response =
       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
 }
 
Parameters
NameDescription
parentString

Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

bigQueryExportBigQueryExport

Required. The BigQuery export being created.

bigQueryExportIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
BigQueryExport

createBigQueryExportCallable()

public final UnaryCallable<CreateBigQueryExportRequest,BigQueryExport> createBigQueryExportCallable()

Creates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateBigQueryExportRequest request =
       CreateBigQueryExportRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setBigQueryExport(BigQueryExport.newBuilder().build())
           .setBigQueryExportId("bigQueryExportId1024198583")
           .build();
   ApiFuture<BigQueryExport> future =
       securityCenterClient.createBigQueryExportCallable().futureCall(request);
   // Do something.
   BigQueryExport response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateBigQueryExportRequest,BigQueryExport>

createFinding(CreateFindingRequest request)

public final Finding createFinding(CreateFindingRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateFindingRequest request =
       CreateFindingRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFindingId("findingId439150212")
           .setFinding(Finding.newBuilder().build())
           .build();
   Finding response = securityCenterClient.createFinding(request);
 }
 
Parameter
NameDescription
requestCreateFindingRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Finding

createFinding(SourceName parent, String findingId, Finding finding)

public final Finding createFinding(SourceName parent, String findingId, Finding finding)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
   String findingId = "findingId439150212";
   Finding finding = Finding.newBuilder().build();
   Finding response = securityCenterClient.createFinding(parent, findingId, finding);
 }
 
Parameters
NameDescription
parentSourceName

Required. Resource name of the new finding's parent. Its format should be "organizations/[organization_id]/sources/[source_id]".

findingIdString

Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.

findingFinding

Required. The Finding being created. The name and security_marks will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
Finding

createFinding(String parent, String findingId, Finding finding)

public final Finding createFinding(String parent, String findingId, Finding finding)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
   String findingId = "findingId439150212";
   Finding finding = Finding.newBuilder().build();
   Finding response = securityCenterClient.createFinding(parent, findingId, finding);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new finding's parent. Its format should be "organizations/[organization_id]/sources/[source_id]".

findingIdString

Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.

findingFinding

Required. The Finding being created. The name and security_marks will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
Finding

createFindingCallable()

public final UnaryCallable<CreateFindingRequest,Finding> createFindingCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateFindingRequest request =
       CreateFindingRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFindingId("findingId439150212")
           .setFinding(Finding.newBuilder().build())
           .build();
   ApiFuture<Finding> future = securityCenterClient.createFindingCallable().futureCall(request);
   // Do something.
   Finding response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateFindingRequest,Finding>

createMuteConfig(CreateMuteConfigRequest request)

public final MuteConfig createMuteConfig(CreateMuteConfigRequest request)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateMuteConfigRequest request =
       CreateMuteConfigRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setMuteConfig(MuteConfig.newBuilder().build())
           .setMuteConfigId("muteConfigId1689669942")
           .build();
   MuteConfig response = securityCenterClient.createMuteConfig(request);
 }
 
Parameter
NameDescription
requestCreateMuteConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
MuteConfig

createMuteConfig(FolderName parent, MuteConfig muteConfig)

public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
 }
 
Parameters
NameDescription
parentFolderName

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

Returns
TypeDescription
MuteConfig

createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId)

public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   String muteConfigId = "muteConfigId1689669942";
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
 }
 
Parameters
NameDescription
parentFolderName

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

muteConfigIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
MuteConfig

createMuteConfig(OrganizationName parent, MuteConfig muteConfig)

public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
 }
 
Parameters
NameDescription
parentOrganizationName

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

Returns
TypeDescription
MuteConfig

createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId)

public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   String muteConfigId = "muteConfigId1689669942";
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
 }
 
Parameters
NameDescription
parentOrganizationName

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

muteConfigIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
MuteConfig

createMuteConfig(ProjectName parent, MuteConfig muteConfig)

public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
 }
 
Parameters
NameDescription
parentProjectName

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

Returns
TypeDescription
MuteConfig

createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId)

public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   String muteConfigId = "muteConfigId1689669942";
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
 }
 
Parameters
NameDescription
parentProjectName

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

muteConfigIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
MuteConfig

createMuteConfig(String parent, MuteConfig muteConfig)

public final MuteConfig createMuteConfig(String parent, MuteConfig muteConfig)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

Returns
TypeDescription
MuteConfig

createMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId)

public final MuteConfig createMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId)

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   String muteConfigId = "muteConfigId1689669942";
   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

muteConfigMuteConfig

Required. The mute config being created.

muteConfigIdString

Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.

Returns
TypeDescription
MuteConfig

createMuteConfigCallable()

public final UnaryCallable<CreateMuteConfigRequest,MuteConfig> createMuteConfigCallable()

Creates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateMuteConfigRequest request =
       CreateMuteConfigRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setMuteConfig(MuteConfig.newBuilder().build())
           .setMuteConfigId("muteConfigId1689669942")
           .build();
   ApiFuture<MuteConfig> future =
       securityCenterClient.createMuteConfigCallable().futureCall(request);
   // Do something.
   MuteConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateMuteConfigRequest,MuteConfig>

createNotificationConfig(CreateNotificationConfigRequest request)

public final NotificationConfig createNotificationConfig(CreateNotificationConfigRequest request)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateNotificationConfigRequest request =
       CreateNotificationConfigRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setConfigId("configId-580140035")
           .setNotificationConfig(NotificationConfig.newBuilder().build())
           .build();
   NotificationConfig response = securityCenterClient.createNotificationConfig(request);
 }
 
Parameter
NameDescription
requestCreateNotificationConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(FolderName parent, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(FolderName parent, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, notificationConfig);
 }
 
Parameters
NameDescription
parentFolderName

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(FolderName parent, String configId, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(FolderName parent, String configId, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   String configId = "configId-580140035";
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
 }
 
Parameters
NameDescription
parentFolderName

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

configIdString

Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(OrganizationName parent, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(OrganizationName parent, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, notificationConfig);
 }
 
Parameters
NameDescription
parentOrganizationName

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(OrganizationName parent, String configId, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(OrganizationName parent, String configId, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   String configId = "configId-580140035";
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
 }
 
Parameters
NameDescription
parentOrganizationName

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

configIdString

Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(ProjectName parent, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(ProjectName parent, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, notificationConfig);
 }
 
Parameters
NameDescription
parentProjectName

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(ProjectName parent, String configId, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(ProjectName parent, String configId, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   String configId = "configId-580140035";
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
 }
 
Parameters
NameDescription
parentProjectName

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

configIdString

Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(String parent, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(String parent, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, notificationConfig);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfig(String parent, String configId, NotificationConfig notificationConfig)

public final NotificationConfig createNotificationConfig(String parent, String configId, NotificationConfig notificationConfig)

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   String configId = "configId-580140035";
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

configIdString

Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.

notificationConfigNotificationConfig

Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.

Returns
TypeDescription
NotificationConfig

createNotificationConfigCallable()

public final UnaryCallable<CreateNotificationConfigRequest,NotificationConfig> createNotificationConfigCallable()

Creates a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateNotificationConfigRequest request =
       CreateNotificationConfigRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setConfigId("configId-580140035")
           .setNotificationConfig(NotificationConfig.newBuilder().build())
           .build();
   ApiFuture<NotificationConfig> future =
       securityCenterClient.createNotificationConfigCallable().futureCall(request);
   // Do something.
   NotificationConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateNotificationConfigRequest,NotificationConfig>

createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest request)

public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateSecurityHealthAnalyticsCustomModuleRequest request =
       CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setSecurityHealthAnalyticsCustomModule(
               SecurityHealthAnalyticsCustomModule.newBuilder().build())
           .build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.createSecurityHealthAnalyticsCustomModule(request);
 }
 
Parameter
NameDescription
requestCreateSecurityHealthAnalyticsCustomModuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

createSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsSettingsName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsSettingsName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsSettingsName parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
   SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
       SecurityHealthAnalyticsCustomModule.newBuilder().build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.createSecurityHealthAnalyticsCustomModule(
           parent, securityHealthAnalyticsCustomModule);
 }
 
Parameters
NameDescription
parentSecurityHealthAnalyticsSettingsName

Required. Resource name of the new custom module's parent. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

securityHealthAnalyticsCustomModuleSecurityHealthAnalyticsCustomModule

Required. SecurityHealthAnalytics custom module to create. The provided name is ignored and reset with provided parent information and server-generated ID.

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

createSecurityHealthAnalyticsCustomModule(String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
   SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
       SecurityHealthAnalyticsCustomModule.newBuilder().build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.createSecurityHealthAnalyticsCustomModule(
           parent, securityHealthAnalyticsCustomModule);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new custom module's parent. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

securityHealthAnalyticsCustomModuleSecurityHealthAnalyticsCustomModule

Required. SecurityHealthAnalytics custom module to create. The provided name is ignored and reset with provided parent information and server-generated ID.

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

createSecurityHealthAnalyticsCustomModuleCallable()

public final UnaryCallable<CreateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> createSecurityHealthAnalyticsCustomModuleCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateSecurityHealthAnalyticsCustomModuleRequest request =
       CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setSecurityHealthAnalyticsCustomModule(
               SecurityHealthAnalyticsCustomModule.newBuilder().build())
           .build();
   ApiFuture<SecurityHealthAnalyticsCustomModule> future =
       securityCenterClient
           .createSecurityHealthAnalyticsCustomModuleCallable()
           .futureCall(request);
   // Do something.
   SecurityHealthAnalyticsCustomModule response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule>

createSource(CreateSourceRequest request)

public final Source createSource(CreateSourceRequest request)

Creates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateSourceRequest request =
       CreateSourceRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setSource(Source.newBuilder().build())
           .build();
   Source response = securityCenterClient.createSource(request);
 }
 
Parameter
NameDescription
requestCreateSourceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Source

createSource(OrganizationName parent, Source source)

public final Source createSource(OrganizationName parent, Source source)

Creates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   Source source = Source.newBuilder().build();
   Source response = securityCenterClient.createSource(parent, source);
 }
 
Parameters
NameDescription
parentOrganizationName

Required. Resource name of the new source's parent. Its format should be "organizations/[organization_id]".

sourceSource

Required. The Source being created, only the display_name and description will be used. All other fields will be ignored.

Returns
TypeDescription
Source

createSource(String parent, Source source)

public final Source createSource(String parent, Source source)

Creates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   Source source = Source.newBuilder().build();
   Source response = securityCenterClient.createSource(parent, source);
 }
 
Parameters
NameDescription
parentString

Required. Resource name of the new source's parent. Its format should be "organizations/[organization_id]".

sourceSource

Required. The Source being created, only the display_name and description will be used. All other fields will be ignored.

Returns
TypeDescription
Source

createSourceCallable()

public final UnaryCallable<CreateSourceRequest,Source> createSourceCallable()

Creates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   CreateSourceRequest request =
       CreateSourceRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setSource(Source.newBuilder().build())
           .build();
   ApiFuture<Source> future = securityCenterClient.createSourceCallable().futureCall(request);
   // Do something.
   Source response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateSourceRequest,Source>

deleteBigQueryExport(BigQueryExportName name)

public final void deleteBigQueryExport(BigQueryExportName name)

Deletes an existing BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   BigQueryExportName name =
       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]");
   securityCenterClient.deleteBigQueryExport(name);
 }
 
Parameter
NameDescription
nameBigQueryExportName

Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}

deleteBigQueryExport(DeleteBigQueryExportRequest request)

public final void deleteBigQueryExport(DeleteBigQueryExportRequest request)

Deletes an existing BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteBigQueryExportRequest request =
       DeleteBigQueryExportRequest.newBuilder()
           .setName(
               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                   .toString())
           .build();
   securityCenterClient.deleteBigQueryExport(request);
 }
 
Parameter
NameDescription
requestDeleteBigQueryExportRequest

The request object containing all of the parameters for the API call.

deleteBigQueryExport(String name)

public final void deleteBigQueryExport(String name)

Deletes an existing BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]").toString();
   securityCenterClient.deleteBigQueryExport(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}

deleteBigQueryExportCallable()

public final UnaryCallable<DeleteBigQueryExportRequest,Empty> deleteBigQueryExportCallable()

Deletes an existing BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteBigQueryExportRequest request =
       DeleteBigQueryExportRequest.newBuilder()
           .setName(
               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       securityCenterClient.deleteBigQueryExportCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteBigQueryExportRequest,Empty>

deleteMuteConfig(DeleteMuteConfigRequest request)

public final void deleteMuteConfig(DeleteMuteConfigRequest request)

Deletes an existing mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteMuteConfigRequest request =
       DeleteMuteConfigRequest.newBuilder()
           .setName(
               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                   .toString())
           .build();
   securityCenterClient.deleteMuteConfig(request);
 }
 
Parameter
NameDescription
requestDeleteMuteConfigRequest

The request object containing all of the parameters for the API call.

deleteMuteConfig(MuteConfigName name)

public final void deleteMuteConfig(MuteConfigName name)

Deletes an existing mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   MuteConfigName name =
       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
   securityCenterClient.deleteMuteConfig(name);
 }
 
Parameter
NameDescription
nameMuteConfigName

Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}

deleteMuteConfig(String name)

public final void deleteMuteConfig(String name)

Deletes an existing mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
   securityCenterClient.deleteMuteConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}

deleteMuteConfigCallable()

public final UnaryCallable<DeleteMuteConfigRequest,Empty> deleteMuteConfigCallable()

Deletes an existing mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteMuteConfigRequest request =
       DeleteMuteConfigRequest.newBuilder()
           .setName(
               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                   .toString())
           .build();
   ApiFuture<Empty> future = securityCenterClient.deleteMuteConfigCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteMuteConfigRequest,Empty>

deleteNotificationConfig(DeleteNotificationConfigRequest request)

public final void deleteNotificationConfig(DeleteNotificationConfigRequest request)

Deletes a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteNotificationConfigRequest request =
       DeleteNotificationConfigRequest.newBuilder()
           .setName(
               NotificationConfigName.ofOrganizationNotificationConfigName(
                       "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                   .toString())
           .build();
   securityCenterClient.deleteNotificationConfig(request);
 }
 
Parameter
NameDescription
requestDeleteNotificationConfigRequest

The request object containing all of the parameters for the API call.

deleteNotificationConfig(NotificationConfigName name)

public final void deleteNotificationConfig(NotificationConfigName name)

Deletes a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   NotificationConfigName name =
       NotificationConfigName.ofOrganizationNotificationConfigName(
           "[ORGANIZATION]", "[NOTIFICATION_CONFIG]");
   securityCenterClient.deleteNotificationConfig(name);
 }
 
Parameter
NameDescription
nameNotificationConfigName

Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]".

deleteNotificationConfig(String name)

public final void deleteNotificationConfig(String name)

Deletes a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       NotificationConfigName.ofOrganizationNotificationConfigName(
               "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
           .toString();
   securityCenterClient.deleteNotificationConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]".

deleteNotificationConfigCallable()

public final UnaryCallable<DeleteNotificationConfigRequest,Empty> deleteNotificationConfigCallable()

Deletes a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteNotificationConfigRequest request =
       DeleteNotificationConfigRequest.newBuilder()
           .setName(
               NotificationConfigName.ofOrganizationNotificationConfigName(
                       "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       securityCenterClient.deleteNotificationConfigCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteNotificationConfigRequest,Empty>

deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest request)

public final void deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteSecurityHealthAnalyticsCustomModuleRequest request =
       DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setName(
               SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                       "[ORGANIZATION]", "[CUSTOM_MODULE]")
                   .toString())
           .build();
   securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(request);
 }
 
Parameter
NameDescription
requestDeleteSecurityHealthAnalyticsCustomModuleRequest

The request object containing all of the parameters for the API call.

deleteSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)

public final void deleteSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsCustomModuleName name =
       SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
           "[ORGANIZATION]", "[CUSTOM_MODULE]");
   securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(name);
 }
 
Parameter
NameDescription
nameSecurityHealthAnalyticsCustomModuleName

Required. Name of the custom module to delete. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"

deleteSecurityHealthAnalyticsCustomModule(String name)

public final void deleteSecurityHealthAnalyticsCustomModule(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
               "[ORGANIZATION]", "[CUSTOM_MODULE]")
           .toString();
   securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the custom module to delete. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"

deleteSecurityHealthAnalyticsCustomModuleCallable()

public final UnaryCallable<DeleteSecurityHealthAnalyticsCustomModuleRequest,Empty> deleteSecurityHealthAnalyticsCustomModuleCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   DeleteSecurityHealthAnalyticsCustomModuleRequest request =
       DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setName(
               SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                       "[ORGANIZATION]", "[CUSTOM_MODULE]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       securityCenterClient
           .deleteSecurityHealthAnalyticsCustomModuleCallable()
           .futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteSecurityHealthAnalyticsCustomModuleRequest,Empty>

getBigQueryExport(BigQueryExportName name)

public final BigQueryExport getBigQueryExport(BigQueryExportName name)

Gets a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   BigQueryExportName name =
       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]");
   BigQueryExport response = securityCenterClient.getBigQueryExport(name);
 }
 
Parameter
NameDescription
nameBigQueryExportName

Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}

Returns
TypeDescription
BigQueryExport

getBigQueryExport(GetBigQueryExportRequest request)

public final BigQueryExport getBigQueryExport(GetBigQueryExportRequest request)

Gets a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetBigQueryExportRequest request =
       GetBigQueryExportRequest.newBuilder()
           .setName(
               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                   .toString())
           .build();
   BigQueryExport response = securityCenterClient.getBigQueryExport(request);
 }
 
Parameter
NameDescription
requestGetBigQueryExportRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
BigQueryExport

getBigQueryExport(String name)

public final BigQueryExport getBigQueryExport(String name)

Gets a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]").toString();
   BigQueryExport response = securityCenterClient.getBigQueryExport(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}

Returns
TypeDescription
BigQueryExport

getBigQueryExportCallable()

public final UnaryCallable<GetBigQueryExportRequest,BigQueryExport> getBigQueryExportCallable()

Gets a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetBigQueryExportRequest request =
       GetBigQueryExportRequest.newBuilder()
           .setName(
               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                   .toString())
           .build();
   ApiFuture<BigQueryExport> future =
       securityCenterClient.getBigQueryExportCallable().futureCall(request);
   // Do something.
   BigQueryExport response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetBigQueryExportRequest,BigQueryExport>

getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name)

public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name)

Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   EffectiveSecurityHealthAnalyticsCustomModuleName name =
       EffectiveSecurityHealthAnalyticsCustomModuleName.ofOrganizationEffectiveCustomModuleName(
           "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]");
   EffectiveSecurityHealthAnalyticsCustomModule response =
       securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
 }
 
Parameter
NameDescription
nameEffectiveSecurityHealthAnalyticsCustomModuleName

Required. Name of the effective custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}"

Returns
TypeDescription
EffectiveSecurityHealthAnalyticsCustomModule

getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request)

public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request)

Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
       GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setName(
               EffectiveSecurityHealthAnalyticsCustomModuleName
                   .ofOrganizationEffectiveCustomModuleName(
                       "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
                   .toString())
           .build();
   EffectiveSecurityHealthAnalyticsCustomModule response =
       securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(request);
 }
 
Parameter
NameDescription
requestGetEffectiveSecurityHealthAnalyticsCustomModuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EffectiveSecurityHealthAnalyticsCustomModule

getEffectiveSecurityHealthAnalyticsCustomModule(String name)

public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(String name)

Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       EffectiveSecurityHealthAnalyticsCustomModuleName.ofOrganizationEffectiveCustomModuleName(
               "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
           .toString();
   EffectiveSecurityHealthAnalyticsCustomModule response =
       securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the effective custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}"

Returns
TypeDescription
EffectiveSecurityHealthAnalyticsCustomModule

getEffectiveSecurityHealthAnalyticsCustomModuleCallable()

public final UnaryCallable<GetEffectiveSecurityHealthAnalyticsCustomModuleRequest,EffectiveSecurityHealthAnalyticsCustomModule> getEffectiveSecurityHealthAnalyticsCustomModuleCallable()

Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
       GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setName(
               EffectiveSecurityHealthAnalyticsCustomModuleName
                   .ofOrganizationEffectiveCustomModuleName(
                       "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
                   .toString())
           .build();
   ApiFuture<EffectiveSecurityHealthAnalyticsCustomModule> future =
       securityCenterClient
           .getEffectiveSecurityHealthAnalyticsCustomModuleCallable()
           .futureCall(request);
   // Do something.
   EffectiveSecurityHealthAnalyticsCustomModule response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetEffectiveSecurityHealthAnalyticsCustomModuleRequest,EffectiveSecurityHealthAnalyticsCustomModule>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getIamPolicy(ResourceName resource)

public final Policy getIamPolicy(ResourceName resource)

Gets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
   Policy response = securityCenterClient.getIamPolicy(resource);
 }
 
Parameter
NameDescription
resourcecom.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = securityCenterClient.getIamPolicy(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicy(String resource)

public final Policy getIamPolicy(String resource)

Gets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String resource = FolderName.of("[FOLDER]").toString();
   Policy response = securityCenterClient.getIamPolicy(resource);
 }
 
Parameter
NameDescription
resourceString

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future = securityCenterClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getMuteConfig(GetMuteConfigRequest request)

public final MuteConfig getMuteConfig(GetMuteConfigRequest request)

Gets a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetMuteConfigRequest request =
       GetMuteConfigRequest.newBuilder()
           .setName(
               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                   .toString())
           .build();
   MuteConfig response = securityCenterClient.getMuteConfig(request);
 }
 
Parameter
NameDescription
requestGetMuteConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
MuteConfig

getMuteConfig(MuteConfigName name)

public final MuteConfig getMuteConfig(MuteConfigName name)

Gets a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   MuteConfigName name =
       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
   MuteConfig response = securityCenterClient.getMuteConfig(name);
 }
 
Parameter
NameDescription
nameMuteConfigName

Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}

Returns
TypeDescription
MuteConfig

getMuteConfig(String name)

public final MuteConfig getMuteConfig(String name)

Gets a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
   MuteConfig response = securityCenterClient.getMuteConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}

Returns
TypeDescription
MuteConfig

getMuteConfigCallable()

public final UnaryCallable<GetMuteConfigRequest,MuteConfig> getMuteConfigCallable()

Gets a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetMuteConfigRequest request =
       GetMuteConfigRequest.newBuilder()
           .setName(
               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                   .toString())
           .build();
   ApiFuture<MuteConfig> future =
       securityCenterClient.getMuteConfigCallable().futureCall(request);
   // Do something.
   MuteConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetMuteConfigRequest,MuteConfig>

getNotificationConfig(GetNotificationConfigRequest request)

public final NotificationConfig getNotificationConfig(GetNotificationConfigRequest request)

Gets a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetNotificationConfigRequest request =
       GetNotificationConfigRequest.newBuilder()
           .setName(
               NotificationConfigName.ofOrganizationNotificationConfigName(
                       "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                   .toString())
           .build();
   NotificationConfig response = securityCenterClient.getNotificationConfig(request);
 }
 
Parameter
NameDescription
requestGetNotificationConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NotificationConfig

getNotificationConfig(NotificationConfigName name)

public final NotificationConfig getNotificationConfig(NotificationConfigName name)

Gets a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   NotificationConfigName name =
       NotificationConfigName.ofOrganizationNotificationConfigName(
           "[ORGANIZATION]", "[NOTIFICATION_CONFIG]");
   NotificationConfig response = securityCenterClient.getNotificationConfig(name);
 }
 
Parameter
NameDescription
nameNotificationConfigName

Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]".

Returns
TypeDescription
NotificationConfig

getNotificationConfig(String name)

public final NotificationConfig getNotificationConfig(String name)

Gets a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       NotificationConfigName.ofOrganizationNotificationConfigName(
               "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
           .toString();
   NotificationConfig response = securityCenterClient.getNotificationConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]".

Returns
TypeDescription
NotificationConfig

getNotificationConfigCallable()

public final UnaryCallable<GetNotificationConfigRequest,NotificationConfig> getNotificationConfigCallable()

Gets a notification config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetNotificationConfigRequest request =
       GetNotificationConfigRequest.newBuilder()
           .setName(
               NotificationConfigName.ofOrganizationNotificationConfigName(
                       "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                   .toString())
           .build();
   ApiFuture<NotificationConfig> future =
       securityCenterClient.getNotificationConfigCallable().futureCall(request);
   // Do something.
   NotificationConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetNotificationConfigRequest,NotificationConfig>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getOrganizationSettings(GetOrganizationSettingsRequest request)

public final OrganizationSettings getOrganizationSettings(GetOrganizationSettingsRequest request)

Gets the settings for an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetOrganizationSettingsRequest request =
       GetOrganizationSettingsRequest.newBuilder()
           .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString())
           .build();
   OrganizationSettings response = securityCenterClient.getOrganizationSettings(request);
 }
 
Parameter
NameDescription
requestGetOrganizationSettingsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OrganizationSettings

getOrganizationSettings(OrganizationSettingsName name)

public final OrganizationSettings getOrganizationSettings(OrganizationSettingsName name)

Gets the settings for an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
 }
 
Parameter
NameDescription
nameOrganizationSettingsName

Required. Name of the organization to get organization settings for. Its format is "organizations/[organization_id]/organizationSettings".

Returns
TypeDescription
OrganizationSettings

getOrganizationSettings(String name)

public final OrganizationSettings getOrganizationSettings(String name)

Gets the settings for an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name = OrganizationSettingsName.of("[ORGANIZATION]").toString();
   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the organization to get organization settings for. Its format is "organizations/[organization_id]/organizationSettings".

Returns
TypeDescription
OrganizationSettings

getOrganizationSettingsCallable()

public final UnaryCallable<GetOrganizationSettingsRequest,OrganizationSettings> getOrganizationSettingsCallable()

Gets the settings for an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetOrganizationSettingsRequest request =
       GetOrganizationSettingsRequest.newBuilder()
           .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString())
           .build();
   ApiFuture<OrganizationSettings> future =
       securityCenterClient.getOrganizationSettingsCallable().futureCall(request);
   // Do something.
   OrganizationSettings response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetOrganizationSettingsRequest,OrganizationSettings>

getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest request)

public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest request)

Retrieves a SecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetSecurityHealthAnalyticsCustomModuleRequest request =
       GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setName(
               SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                       "[ORGANIZATION]", "[CUSTOM_MODULE]")
                   .toString())
           .build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.getSecurityHealthAnalyticsCustomModule(request);
 }
 
Parameter
NameDescription
requestGetSecurityHealthAnalyticsCustomModuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

getSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)

public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)

Retrieves a SecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsCustomModuleName name =
       SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
           "[ORGANIZATION]", "[CUSTOM_MODULE]");
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.getSecurityHealthAnalyticsCustomModule(name);
 }
 
Parameter
NameDescription
nameSecurityHealthAnalyticsCustomModuleName

Required. Name of the custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

getSecurityHealthAnalyticsCustomModule(String name)

public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(String name)

Retrieves a SecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
               "[ORGANIZATION]", "[CUSTOM_MODULE]")
           .toString();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.getSecurityHealthAnalyticsCustomModule(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

getSecurityHealthAnalyticsCustomModuleCallable()

public final UnaryCallable<GetSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> getSecurityHealthAnalyticsCustomModuleCallable()

Retrieves a SecurityHealthAnalyticsCustomModule.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetSecurityHealthAnalyticsCustomModuleRequest request =
       GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setName(
               SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                       "[ORGANIZATION]", "[CUSTOM_MODULE]")
                   .toString())
           .build();
   ApiFuture<SecurityHealthAnalyticsCustomModule> future =
       securityCenterClient.getSecurityHealthAnalyticsCustomModuleCallable().futureCall(request);
   // Do something.
   SecurityHealthAnalyticsCustomModule response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule>

getSettings()

public final SecurityCenterSettings getSettings()
Returns
TypeDescription
SecurityCenterSettings

getSource(GetSourceRequest request)

public final Source getSource(GetSourceRequest request)

Gets a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetSourceRequest request =
       GetSourceRequest.newBuilder()
           .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .build();
   Source response = securityCenterClient.getSource(request);
 }
 
Parameter
NameDescription
requestGetSourceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Source

getSource(SourceName name)

public final Source getSource(SourceName name)

Gets a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
   Source response = securityCenterClient.getSource(name);
 }
 
Parameter
NameDescription
nameSourceName

Required. Relative resource name of the source. Its format is "organizations/[organization_id]/source/[source_id]".

Returns
TypeDescription
Source

getSource(String name)

public final Source getSource(String name)

Gets a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
   Source response = securityCenterClient.getSource(name);
 }
 
Parameter
NameDescription
nameString

Required. Relative resource name of the source. Its format is "organizations/[organization_id]/source/[source_id]".

Returns
TypeDescription
Source

getSourceCallable()

public final UnaryCallable<GetSourceRequest,Source> getSourceCallable()

Gets a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GetSourceRequest request =
       GetSourceRequest.newBuilder()
           .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .build();
   ApiFuture<Source> future = securityCenterClient.getSourceCallable().futureCall(request);
   // Do something.
   Source response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetSourceRequest,Source>

getStub()

public SecurityCenterStub getStub()
Returns
TypeDescription
SecurityCenterStub

groupAssets(GroupAssetsRequest request) (deprecated)

public final SecurityCenterClient.GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request)

Deprecated. This method is deprecated and will be removed in the next major version update.

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GroupAssetsRequest request =
       GroupAssetsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setFilter("filter-1274492040")
           .setGroupBy("groupBy293428022")
           .setCompareDuration(Duration.newBuilder().build())
           .setReadTime(Timestamp.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (GroupResult element : securityCenterClient.groupAssets(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestGroupAssetsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.GroupAssetsPagedResponse

groupAssetsCallable() (deprecated)

public final UnaryCallable<GroupAssetsRequest,GroupAssetsResponse> groupAssetsCallable()

Deprecated. This method is deprecated and will be removed in the next major version update.

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GroupAssetsRequest request =
       GroupAssetsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setFilter("filter-1274492040")
           .setGroupBy("groupBy293428022")
           .setCompareDuration(Duration.newBuilder().build())
           .setReadTime(Timestamp.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request);
     for (GroupResult element : response.getGroupByResultsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<GroupAssetsRequest,GroupAssetsResponse>

groupAssetsPagedCallable() (deprecated)

public final UnaryCallable<GroupAssetsRequest,SecurityCenterClient.GroupAssetsPagedResponse> groupAssetsPagedCallable()

Deprecated. This method is deprecated and will be removed in the next major version update.

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GroupAssetsRequest request =
       GroupAssetsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setFilter("filter-1274492040")
           .setGroupBy("groupBy293428022")
           .setCompareDuration(Duration.newBuilder().build())
           .setReadTime(Timestamp.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<GroupResult> future =
       securityCenterClient.groupAssetsPagedCallable().futureCall(request);
   // Do something.
   for (GroupResult element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<GroupAssetsRequest,GroupAssetsPagedResponse>

groupFindings(GroupFindingsRequest request)

public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(GroupFindingsRequest request)

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GroupFindingsRequest request =
       GroupFindingsRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFilter("filter-1274492040")
           .setGroupBy("groupBy293428022")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (GroupResult element : securityCenterClient.groupFindings(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestGroupFindingsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.GroupFindingsPagedResponse

groupFindings(SourceName parent, String groupBy)

public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(SourceName parent, String groupBy)

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
   String groupBy = "groupBy293428022";
   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
parentSourceName

Required. Name of the source to groupBy. Its format is "organizations/[organization_id]/sources/[source_id]", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of -. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-

groupByString

Required. Expression that defines what assets fields to use for grouping (including state_change). The string value should follow SQL syntax: comma separated list of fields. For example: "parent,resource_name".

The following fields are supported:

  • resource_name
  • category
  • state
  • parent
  • severity

The following fields are supported when compare_duration is set:

  • state_change

Returns
TypeDescription
SecurityCenterClient.GroupFindingsPagedResponse

groupFindings(String parent, String groupBy)

public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(String parent, String groupBy)

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
   String groupBy = "groupBy293428022";
   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
parentString

Required. Name of the source to groupBy. Its format is "organizations/[organization_id]/sources/[source_id]", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of -. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-

groupByString

Required. Expression that defines what assets fields to use for grouping (including state_change). The string value should follow SQL syntax: comma separated list of fields. For example: "parent,resource_name".

The following fields are supported:

  • resource_name
  • category
  • state
  • parent
  • severity

The following fields are supported when compare_duration is set:

  • state_change

Returns
TypeDescription
SecurityCenterClient.GroupFindingsPagedResponse

groupFindingsCallable()

public final UnaryCallable<GroupFindingsRequest,GroupFindingsResponse> groupFindingsCallable()

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GroupFindingsRequest request =
       GroupFindingsRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFilter("filter-1274492040")
           .setGroupBy("groupBy293428022")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request);
     for (GroupResult element : response.getGroupByResultsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<GroupFindingsRequest,GroupFindingsResponse>

groupFindingsPagedCallable()

public final UnaryCallable<GroupFindingsRequest,SecurityCenterClient.GroupFindingsPagedResponse> groupFindingsPagedCallable()

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   GroupFindingsRequest request =
       GroupFindingsRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFilter("filter-1274492040")
           .setGroupBy("groupBy293428022")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<GroupResult> future =
       securityCenterClient.groupFindingsPagedCallable().futureCall(request);
   // Do something.
   for (GroupResult element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<GroupFindingsRequest,GroupFindingsPagedResponse>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listAssets(ListAssetsRequest request) (deprecated)

public final SecurityCenterClient.ListAssetsPagedResponse listAssets(ListAssetsRequest request)

Deprecated. This method is deprecated and will be removed in the next major version update.

Lists an organization's assets.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListAssetsRequest request =
       ListAssetsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setFieldMask(FieldMask.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (ListAssetsResponse.ListAssetsResult element :
       securityCenterClient.listAssets(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListAssetsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListAssetsPagedResponse

listAssetsCallable() (deprecated)

public final UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()

Deprecated. This method is deprecated and will be removed in the next major version update.

Lists an organization's assets.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListAssetsRequest request =
       ListAssetsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setFieldMask(FieldMask.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListAssetsResponse response = securityCenterClient.listAssetsCallable().call(request);
     for (ListAssetsResponse.ListAssetsResult element : response.getListAssetsResultsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListAssetsRequest,ListAssetsResponse>

listAssetsPagedCallable() (deprecated)

public final UnaryCallable<ListAssetsRequest,SecurityCenterClient.ListAssetsPagedResponse> listAssetsPagedCallable()

Deprecated. This method is deprecated and will be removed in the next major version update.

Lists an organization's assets.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListAssetsRequest request =
       ListAssetsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setFieldMask(FieldMask.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<ListAssetsResponse.ListAssetsResult> future =
       securityCenterClient.listAssetsPagedCallable().futureCall(request);
   // Do something.
   for (ListAssetsResponse.ListAssetsResult element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListAssetsRequest,ListAssetsPagedResponse>

listBigQueryExports(FolderName parent)

public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(FolderName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentFolderName

Required. The parent, which owns the collection of BigQuery exports. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListBigQueryExportsPagedResponse

listBigQueryExports(ListBigQueryExportsRequest request)

public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(ListBigQueryExportsRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListBigQueryExportsRequest request =
       ListBigQueryExportsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (BigQueryExport element :
       securityCenterClient.listBigQueryExports(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListBigQueryExportsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListBigQueryExportsPagedResponse

listBigQueryExports(OrganizationName parent)

public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(OrganizationName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentOrganizationName

Required. The parent, which owns the collection of BigQuery exports. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListBigQueryExportsPagedResponse

listBigQueryExports(ProjectName parent)

public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(ProjectName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The parent, which owns the collection of BigQuery exports. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListBigQueryExportsPagedResponse

listBigQueryExports(String parent)

public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(String parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent, which owns the collection of BigQuery exports. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListBigQueryExportsPagedResponse

listBigQueryExportsCallable()

public final UnaryCallable<ListBigQueryExportsRequest,ListBigQueryExportsResponse> listBigQueryExportsCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListBigQueryExportsRequest request =
       ListBigQueryExportsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListBigQueryExportsResponse response =
         securityCenterClient.listBigQueryExportsCallable().call(request);
     for (BigQueryExport element : response.getBigQueryExportsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListBigQueryExportsRequest,ListBigQueryExportsResponse>

listBigQueryExportsPagedCallable()

public final UnaryCallable<ListBigQueryExportsRequest,SecurityCenterClient.ListBigQueryExportsPagedResponse> listBigQueryExportsPagedCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListBigQueryExportsRequest request =
       ListBigQueryExportsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<BigQueryExport> future =
       securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request);
   // Do something.
   for (BigQueryExport element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListBigQueryExportsRequest,ListBigQueryExportsPagedResponse>

listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest request)

public final SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
       ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (SecurityHealthAnalyticsCustomModule element :
       securityCenterClient
           .listDescendantSecurityHealthAnalyticsCustomModules(request)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListDescendantSecurityHealthAnalyticsCustomModulesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse

listDescendantSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

public final SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsSettingsName parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
   for (SecurityHealthAnalyticsCustomModule element :
       securityCenterClient
           .listDescendantSecurityHealthAnalyticsCustomModules(parent)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentSecurityHealthAnalyticsSettingsName

Required. Name of parent to list descendant custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

Returns
TypeDescription
SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse

listDescendantSecurityHealthAnalyticsCustomModules(String parent)

public final SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(String parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
   for (SecurityHealthAnalyticsCustomModule element :
       securityCenterClient
           .listDescendantSecurityHealthAnalyticsCustomModules(parent)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Name of parent to list descendant custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

Returns
TypeDescription
SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse

listDescendantSecurityHealthAnalyticsCustomModulesCallable()

public final UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,ListDescendantSecurityHealthAnalyticsCustomModulesResponse> listDescendantSecurityHealthAnalyticsCustomModulesCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
       ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListDescendantSecurityHealthAnalyticsCustomModulesResponse response =
         securityCenterClient
             .listDescendantSecurityHealthAnalyticsCustomModulesCallable()
             .call(request);
     for (SecurityHealthAnalyticsCustomModule element :
         response.getSecurityHealthAnalyticsCustomModulesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,ListDescendantSecurityHealthAnalyticsCustomModulesResponse>

listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable()

public final UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse> listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
       ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<SecurityHealthAnalyticsCustomModule> future =
       securityCenterClient
           .listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable()
           .futureCall(request);
   // Do something.
   for (SecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse>

listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request)

public final SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
       ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (EffectiveSecurityHealthAnalyticsCustomModule element :
       securityCenterClient
           .listEffectiveSecurityHealthAnalyticsCustomModules(request)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListEffectiveSecurityHealthAnalyticsCustomModulesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse

listEffectiveSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

public final SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsSettingsName parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
   for (EffectiveSecurityHealthAnalyticsCustomModule element :
       securityCenterClient
           .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentSecurityHealthAnalyticsSettingsName

Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

Returns
TypeDescription
SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse

listEffectiveSecurityHealthAnalyticsCustomModules(String parent)

public final SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(String parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
   for (EffectiveSecurityHealthAnalyticsCustomModule element :
       securityCenterClient
           .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

Returns
TypeDescription
SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse

listEffectiveSecurityHealthAnalyticsCustomModulesCallable()

public final UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,ListEffectiveSecurityHealthAnalyticsCustomModulesResponse> listEffectiveSecurityHealthAnalyticsCustomModulesCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
       ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListEffectiveSecurityHealthAnalyticsCustomModulesResponse response =
         securityCenterClient
             .listEffectiveSecurityHealthAnalyticsCustomModulesCallable()
             .call(request);
     for (EffectiveSecurityHealthAnalyticsCustomModule element :
         response.getEffectiveSecurityHealthAnalyticsCustomModulesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,ListEffectiveSecurityHealthAnalyticsCustomModulesResponse>

listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable()

public final UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse> listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
       ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<EffectiveSecurityHealthAnalyticsCustomModule> future =
       securityCenterClient
           .listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable()
           .futureCall(request);
   // Do something.
   for (EffectiveSecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse>

listFindings(ListFindingsRequest request)

public final SecurityCenterClient.ListFindingsPagedResponse listFindings(ListFindingsRequest request)

Lists an organization or source's findings.

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListFindingsRequest request =
       ListFindingsRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setFieldMask(FieldMask.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (ListFindingsResponse.ListFindingsResult element :
       securityCenterClient.listFindings(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListFindingsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListFindingsPagedResponse

listFindingsCallable()

public final UnaryCallable<ListFindingsRequest,ListFindingsResponse> listFindingsCallable()

Lists an organization or source's findings.

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListFindingsRequest request =
       ListFindingsRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setFieldMask(FieldMask.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request);
     for (ListFindingsResponse.ListFindingsResult element :
         response.getListFindingsResultsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListFindingsRequest,ListFindingsResponse>

listFindingsPagedCallable()

public final UnaryCallable<ListFindingsRequest,SecurityCenterClient.ListFindingsPagedResponse> listFindingsPagedCallable()

Lists an organization or source's findings.

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListFindingsRequest request =
       ListFindingsRequest.newBuilder()
           .setParent(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReadTime(Timestamp.newBuilder().build())
           .setCompareDuration(Duration.newBuilder().build())
           .setFieldMask(FieldMask.newBuilder().build())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<ListFindingsResponse.ListFindingsResult> future =
       securityCenterClient.listFindingsPagedCallable().futureCall(request);
   // Do something.
   for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListFindingsRequest,ListFindingsPagedResponse>

listMuteConfigs(FolderName parent)

public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(FolderName parent)

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentFolderName

Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListMuteConfigsPagedResponse

listMuteConfigs(ListMuteConfigsRequest request)

public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(ListMuteConfigsRequest request)

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListMuteConfigsRequest request =
       ListMuteConfigsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (MuteConfig element : securityCenterClient.listMuteConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListMuteConfigsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListMuteConfigsPagedResponse

listMuteConfigs(OrganizationName parent)

public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(OrganizationName parent)

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentOrganizationName

Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListMuteConfigsPagedResponse

listMuteConfigs(ProjectName parent)

public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(ProjectName parent)

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListMuteConfigsPagedResponse

listMuteConfigs(String parent)

public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(String parent)

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListMuteConfigsPagedResponse

listMuteConfigsCallable()

public final UnaryCallable<ListMuteConfigsRequest,ListMuteConfigsResponse> listMuteConfigsCallable()

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListMuteConfigsRequest request =
       ListMuteConfigsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListMuteConfigsResponse response =
         securityCenterClient.listMuteConfigsCallable().call(request);
     for (MuteConfig element : response.getMuteConfigsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListMuteConfigsRequest,ListMuteConfigsResponse>

listMuteConfigsPagedCallable()

public final UnaryCallable<ListMuteConfigsRequest,SecurityCenterClient.ListMuteConfigsPagedResponse> listMuteConfigsPagedCallable()

Lists mute configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListMuteConfigsRequest request =
       ListMuteConfigsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<MuteConfig> future =
       securityCenterClient.listMuteConfigsPagedCallable().futureCall(request);
   // Do something.
   for (MuteConfig element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListMuteConfigsRequest,ListMuteConfigsPagedResponse>

listNotificationConfigs(FolderName parent)

public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(FolderName parent)

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   for (NotificationConfig element :
       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentFolderName

Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListNotificationConfigsPagedResponse

listNotificationConfigs(ListNotificationConfigsRequest request)

public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(ListNotificationConfigsRequest request)

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListNotificationConfigsRequest request =
       ListNotificationConfigsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (NotificationConfig element :
       securityCenterClient.listNotificationConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListNotificationConfigsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListNotificationConfigsPagedResponse

listNotificationConfigs(OrganizationName parent)

public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(OrganizationName parent)

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   for (NotificationConfig element :
       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentOrganizationName

Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListNotificationConfigsPagedResponse

listNotificationConfigs(ProjectName parent)

public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(ProjectName parent)

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (NotificationConfig element :
       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListNotificationConfigsPagedResponse

listNotificationConfigs(String parent)

public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(String parent)

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   for (NotificationConfig element :
       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListNotificationConfigsPagedResponse

listNotificationConfigsCallable()

public final UnaryCallable<ListNotificationConfigsRequest,ListNotificationConfigsResponse> listNotificationConfigsCallable()

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListNotificationConfigsRequest request =
       ListNotificationConfigsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListNotificationConfigsResponse response =
         securityCenterClient.listNotificationConfigsCallable().call(request);
     for (NotificationConfig element : response.getNotificationConfigsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListNotificationConfigsRequest,ListNotificationConfigsResponse>

listNotificationConfigsPagedCallable()

public final UnaryCallable<ListNotificationConfigsRequest,SecurityCenterClient.ListNotificationConfigsPagedResponse> listNotificationConfigsPagedCallable()

Lists notification configs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListNotificationConfigsRequest request =
       ListNotificationConfigsRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<NotificationConfig> future =
       securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request);
   // Do something.
   for (NotificationConfig element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListNotificationConfigsRequest,ListNotificationConfigsPagedResponse>

listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest request)

public final SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListSecurityHealthAnalyticsCustomModulesRequest request =
       ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (SecurityHealthAnalyticsCustomModule element :
       securityCenterClient.listSecurityHealthAnalyticsCustomModules(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListSecurityHealthAnalyticsCustomModulesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse

listSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

public final SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsSettingsName parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
   for (SecurityHealthAnalyticsCustomModule element :
       securityCenterClient.listSecurityHealthAnalyticsCustomModules(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentSecurityHealthAnalyticsSettingsName

Required. Name of parent to list custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

Returns
TypeDescription
SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse

listSecurityHealthAnalyticsCustomModules(String parent)

public final SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(String parent)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
   for (SecurityHealthAnalyticsCustomModule element :
       securityCenterClient.listSecurityHealthAnalyticsCustomModules(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Name of parent to list custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings"

Returns
TypeDescription
SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse

listSecurityHealthAnalyticsCustomModulesCallable()

public final UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,ListSecurityHealthAnalyticsCustomModulesResponse> listSecurityHealthAnalyticsCustomModulesCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListSecurityHealthAnalyticsCustomModulesRequest request =
       ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListSecurityHealthAnalyticsCustomModulesResponse response =
         securityCenterClient.listSecurityHealthAnalyticsCustomModulesCallable().call(request);
     for (SecurityHealthAnalyticsCustomModule element :
         response.getSecurityHealthAnalyticsCustomModulesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,ListSecurityHealthAnalyticsCustomModulesResponse>

listSecurityHealthAnalyticsCustomModulesPagedCallable()

public final UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse> listSecurityHealthAnalyticsCustomModulesPagedCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListSecurityHealthAnalyticsCustomModulesRequest request =
       ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
           .setParent(
               SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<SecurityHealthAnalyticsCustomModule> future =
       securityCenterClient
           .listSecurityHealthAnalyticsCustomModulesPagedCallable()
           .futureCall(request);
   // Do something.
   for (SecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,ListSecurityHealthAnalyticsCustomModulesPagedResponse>

listSources(FolderName parent)

public final SecurityCenterClient.ListSourcesPagedResponse listSources(FolderName parent)

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FolderName parent = FolderName.of("[FOLDER]");
   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentFolderName

Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListSourcesPagedResponse

listSources(ListSourcesRequest request)

public final SecurityCenterClient.ListSourcesPagedResponse listSources(ListSourcesRequest request)

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListSourcesRequest request =
       ListSourcesRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (Source element : securityCenterClient.listSources(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListSourcesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityCenterClient.ListSourcesPagedResponse

listSources(OrganizationName parent)

public final SecurityCenterClient.ListSourcesPagedResponse listSources(OrganizationName parent)

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentOrganizationName

Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListSourcesPagedResponse

listSources(ProjectName parent)

public final SecurityCenterClient.ListSourcesPagedResponse listSources(ProjectName parent)

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListSourcesPagedResponse

listSources(String parent)

public final SecurityCenterClient.ListSourcesPagedResponse listSources(String parent)

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".

Returns
TypeDescription
SecurityCenterClient.ListSourcesPagedResponse

listSourcesCallable()

public final UnaryCallable<ListSourcesRequest,ListSourcesResponse> listSourcesCallable()

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListSourcesRequest request =
       ListSourcesRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request);
     for (Source element : response.getSourcesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListSourcesRequest,ListSourcesResponse>

listSourcesPagedCallable()

public final UnaryCallable<ListSourcesRequest,SecurityCenterClient.ListSourcesPagedResponse> listSourcesPagedCallable()

Lists all sources belonging to an organization.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ListSourcesRequest request =
       ListSourcesRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<Source> future =
       securityCenterClient.listSourcesPagedCallable().futureCall(request);
   // Do something.
   for (Source element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListSourcesRequest,ListSourcesPagedResponse>

runAssetDiscoveryAsync(OrganizationName parent) (deprecated)

public final OperationFuture<RunAssetDiscoveryResponse,Empty> runAssetDiscoveryAsync(OrganizationName parent)

Deprecated. This method is deprecated and will be removed in the next major version update.

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   RunAssetDiscoveryResponse response =
       securityCenterClient.runAssetDiscoveryAsync(parent).get();
 }
 
Parameter
NameDescription
parentOrganizationName

Required. Name of the organization to run asset discovery for. Its format is "organizations/[organization_id]".

Returns
TypeDescription
OperationFuture<RunAssetDiscoveryResponse,Empty>

runAssetDiscoveryAsync(RunAssetDiscoveryRequest request) (deprecated)

public final OperationFuture<RunAssetDiscoveryResponse,Empty> runAssetDiscoveryAsync(RunAssetDiscoveryRequest request)

Deprecated. This method is deprecated and will be removed in the next major version update.

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   RunAssetDiscoveryRequest request =
       RunAssetDiscoveryRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .build();
   RunAssetDiscoveryResponse response =
       securityCenterClient.runAssetDiscoveryAsync(request).get();
 }
 
Parameter
NameDescription
requestRunAssetDiscoveryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<RunAssetDiscoveryResponse,Empty>

runAssetDiscoveryAsync(String parent) (deprecated)

public final OperationFuture<RunAssetDiscoveryResponse,Empty> runAssetDiscoveryAsync(String parent)

Deprecated. This method is deprecated and will be removed in the next major version update.

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   RunAssetDiscoveryResponse response =
       securityCenterClient.runAssetDiscoveryAsync(parent).get();
 }
 
Parameter
NameDescription
parentString

Required. Name of the organization to run asset discovery for. Its format is "organizations/[organization_id]".

Returns
TypeDescription
OperationFuture<RunAssetDiscoveryResponse,Empty>

runAssetDiscoveryCallable() (deprecated)

public final UnaryCallable<RunAssetDiscoveryRequest,Operation> runAssetDiscoveryCallable()

Deprecated. This method is deprecated and will be removed in the next major version update.

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   RunAssetDiscoveryRequest request =
       RunAssetDiscoveryRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .build();
   ApiFuture<Operation> future =
       securityCenterClient.runAssetDiscoveryCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RunAssetDiscoveryRequest,Operation>

runAssetDiscoveryOperationCallable() (deprecated)

public final OperationCallable<RunAssetDiscoveryRequest,RunAssetDiscoveryResponse,Empty> runAssetDiscoveryOperationCallable()

Deprecated. This method is deprecated and will be removed in the next major version update.

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

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   RunAssetDiscoveryRequest request =
       RunAssetDiscoveryRequest.newBuilder()
           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
           .build();
   OperationFuture<RunAssetDiscoveryResponse, Empty> future =
       securityCenterClient.runAssetDiscoveryOperationCallable().futureCall(request);
   // Do something.
   RunAssetDiscoveryResponse response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RunAssetDiscoveryRequest,RunAssetDiscoveryResponse,Empty>

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

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

Updates the state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FindingName name =
       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
   Finding.State state = Finding.State.forNumber(0);
   Timestamp startTime = Timestamp.newBuilder().build();
   Finding response = securityCenterClient.setFindingState(name, state, startTime);
 }
 
Parameters
NameDescription
nameFindingName

Required. The relative resource name of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}".

stateFinding.State

Required. The desired State of the finding.

startTimeTimestamp

Required. The time at which the updated state takes effect.

Returns
TypeDescription
Finding

setFindingState(SetFindingStateRequest request)

public final Finding setFindingState(SetFindingStateRequest request)

Updates the state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SetFindingStateRequest request =
       SetFindingStateRequest.newBuilder()
           .setName(
               FindingName.ofOrganizationSourceFindingName(
                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                   .toString())
           .setStartTime(Timestamp.newBuilder().build())
           .build();
   Finding response = securityCenterClient.setFindingState(request);
 }
 
Parameter
NameDescription
requestSetFindingStateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Finding

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

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

Updates the state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
           .toString();
   Finding.State state = Finding.State.forNumber(0);
   Timestamp startTime = Timestamp.newBuilder().build();
   Finding response = securityCenterClient.setFindingState(name, state, startTime);
 }
 
Parameters
NameDescription
nameString

Required. The relative resource name of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}".

stateFinding.State

Required. The desired State of the finding.

startTimeTimestamp

Required. The time at which the updated state takes effect.

Returns
TypeDescription
Finding

setFindingStateCallable()

public final UnaryCallable<SetFindingStateRequest,Finding> setFindingStateCallable()

Updates the state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SetFindingStateRequest request =
       SetFindingStateRequest.newBuilder()
           .setName(
               FindingName.ofOrganizationSourceFindingName(
                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                   .toString())
           .setStartTime(Timestamp.newBuilder().build())
           .build();
   ApiFuture<Finding> future =
       securityCenterClient.setFindingStateCallable().futureCall(request);
   // Do something.
   Finding response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SetFindingStateRequest,Finding>

setIamPolicy(ResourceName resource, Policy policy)

public final Policy setIamPolicy(ResourceName resource, Policy policy)

Sets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
   Policy policy = Policy.newBuilder().build();
   Policy response = securityCenterClient.setIamPolicy(resource, policy);
 }
 
Parameters
NameDescription
resourcecom.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policycom.google.iam.v1.Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = securityCenterClient.setIamPolicy(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicy(String resource, Policy policy)

public final Policy setIamPolicy(String resource, Policy policy)

Sets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String resource = FolderName.of("[FOLDER]").toString();
   Policy policy = Policy.newBuilder().build();
   Policy response = securityCenterClient.setIamPolicy(resource, policy);
 }
 
Parameters
NameDescription
resourceString

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policycom.google.iam.v1.Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future = securityCenterClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

setMute(FindingName name, Finding.Mute mute)

public final Finding setMute(FindingName name, Finding.Mute mute)

Updates the mute state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   FindingName name =
       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
   Finding.Mute mute = Finding.Mute.forNumber(0);
   Finding response = securityCenterClient.setMute(name, mute);
 }
 
Parameters
NameDescription
nameFindingName

Required. The relative resource name of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}".

muteFinding.Mute

Required. The desired state of the Mute.

Returns
TypeDescription
Finding

setMute(SetMuteRequest request)

public final Finding setMute(SetMuteRequest request)

Updates the mute state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SetMuteRequest request =
       SetMuteRequest.newBuilder()
           .setName(
               FindingName.ofOrganizationSourceFindingName(
                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                   .toString())
           .build();
   Finding response = securityCenterClient.setMute(request);
 }
 
Parameter
NameDescription
requestSetMuteRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Finding

setMute(String name, Finding.Mute mute)

public final Finding setMute(String name, Finding.Mute mute)

Updates the mute state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String name =
       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
           .toString();
   Finding.Mute mute = Finding.Mute.forNumber(0);
   Finding response = securityCenterClient.setMute(name, mute);
 }
 
Parameters
NameDescription
nameString

Required. The relative resource name of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}".

muteFinding.Mute

Required. The desired state of the Mute.

Returns
TypeDescription
Finding

setMuteCallable()

public final UnaryCallable<SetMuteRequest,Finding> setMuteCallable()

Updates the mute state of a finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SetMuteRequest request =
       SetMuteRequest.newBuilder()
           .setName(
               FindingName.ofOrganizationSourceFindingName(
                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                   .toString())
           .build();
   ApiFuture<Finding> future = securityCenterClient.setMuteCallable().futureCall(request);
   // Do something.
   Finding response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SetMuteRequest,Finding>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest request)

public final SimulateSecurityHealthAnalyticsCustomModuleResponse simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest request)

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SimulateSecurityHealthAnalyticsCustomModuleRequest request =
       SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setParent("parent-995424086")
           .setCustomConfig(CustomConfig.newBuilder().build())
           .setResource(
               SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
                   .build())
           .build();
   SimulateSecurityHealthAnalyticsCustomModuleResponse response =
       securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(request);
 }
 
Parameter
NameDescription
requestSimulateSecurityHealthAnalyticsCustomModuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SimulateSecurityHealthAnalyticsCustomModuleResponse

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

public final SimulateSecurityHealthAnalyticsCustomModuleResponse simulateSecurityHealthAnalyticsCustomModule(String parent, CustomConfig customConfig, SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource)

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String parent = "parent-995424086";
   CustomConfig customConfig = CustomConfig.newBuilder().build();
   SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource =
       SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build();
   SimulateSecurityHealthAnalyticsCustomModuleResponse response =
       securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(
           parent, customConfig, resource);
 }
 
Parameters
NameDescription
parentString

Required. The relative resource name of the organization, project, or folder. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name An example is: "organizations/{organization_id}".

customConfigCustomConfig

Required. The user specified custom configuration to test.

resourceSimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource

Required. Resource data to simulate custom module against.

Returns
TypeDescription
SimulateSecurityHealthAnalyticsCustomModuleResponse

simulateSecurityHealthAnalyticsCustomModuleCallable()

public final UnaryCallable<SimulateSecurityHealthAnalyticsCustomModuleRequest,SimulateSecurityHealthAnalyticsCustomModuleResponse> simulateSecurityHealthAnalyticsCustomModuleCallable()

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SimulateSecurityHealthAnalyticsCustomModuleRequest request =
       SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setParent("parent-995424086")
           .setCustomConfig(CustomConfig.newBuilder().build())
           .setResource(
               SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
                   .build())
           .build();
   ApiFuture<SimulateSecurityHealthAnalyticsCustomModuleResponse> future =
       securityCenterClient
           .simulateSecurityHealthAnalyticsCustomModuleCallable()
           .futureCall(request);
   // Do something.
   SimulateSecurityHealthAnalyticsCustomModuleResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SimulateSecurityHealthAnalyticsCustomModuleRequest,SimulateSecurityHealthAnalyticsCustomModuleResponse>

testIamPermissions(ResourceName resource, List<String> permissions)

public final TestIamPermissionsResponse testIamPermissions(ResourceName resource, List<String> permissions)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
   List<String> permissions = new ArrayList<>();
   TestIamPermissionsResponse response =
       securityCenterClient.testIamPermissions(resource, permissions);
 }
 
Parameters
NameDescription
resourcecom.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissionsList<String>

The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissions(String resource, List<String> permissions)

public final TestIamPermissionsResponse testIamPermissions(String resource, List<String> permissions)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   String resource = FolderName.of("[FOLDER]").toString();
   List<String> permissions = new ArrayList<>();
   TestIamPermissionsResponse response =
       securityCenterClient.testIamPermissions(resource, permissions);
 }
 
Parameters
NameDescription
resourceString

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissionsList<String>

The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(
               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       securityCenterClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask)

public final BigQueryExport updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask)

Updates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   BigQueryExport response =
       securityCenterClient.updateBigQueryExport(bigQueryExport, updateMask);
 }
 
Parameters
NameDescription
bigQueryExportBigQueryExport

Required. The BigQuery export being updated.

updateMaskFieldMask

The list of fields to be updated. If empty all mutable fields will be updated.

Returns
TypeDescription
BigQueryExport

updateBigQueryExport(UpdateBigQueryExportRequest request)

public final BigQueryExport updateBigQueryExport(UpdateBigQueryExportRequest request)

Updates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateBigQueryExportRequest request =
       UpdateBigQueryExportRequest.newBuilder()
           .setBigQueryExport(BigQueryExport.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   BigQueryExport response = securityCenterClient.updateBigQueryExport(request);
 }
 
Parameter
NameDescription
requestUpdateBigQueryExportRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
BigQueryExport

updateBigQueryExportCallable()

public final UnaryCallable<UpdateBigQueryExportRequest,BigQueryExport> updateBigQueryExportCallable()

Updates a BigQuery export.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateBigQueryExportRequest request =
       UpdateBigQueryExportRequest.newBuilder()
           .setBigQueryExport(BigQueryExport.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<BigQueryExport> future =
       securityCenterClient.updateBigQueryExportCallable().futureCall(request);
   // Do something.
   BigQueryExport response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateBigQueryExportRequest,BigQueryExport>

updateExternalSystem(ExternalSystem externalSystem, FieldMask updateMask)

public final ExternalSystem updateExternalSystem(ExternalSystem externalSystem, FieldMask updateMask)

Updates external system. This is for a given finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   ExternalSystem externalSystem = ExternalSystem.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   ExternalSystem response =
       securityCenterClient.updateExternalSystem(externalSystem, updateMask);
 }
 
Parameters
NameDescription
externalSystemExternalSystem

Required. The external system resource to update.

updateMaskFieldMask

The FieldMask to use when updating the external system resource.

If empty all mutable fields will be updated.

Returns
TypeDescription
ExternalSystem

updateExternalSystem(UpdateExternalSystemRequest request)

public final ExternalSystem updateExternalSystem(UpdateExternalSystemRequest request)

Updates external system. This is for a given finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateExternalSystemRequest request =
       UpdateExternalSystemRequest.newBuilder()
           .setExternalSystem(ExternalSystem.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ExternalSystem response = securityCenterClient.updateExternalSystem(request);
 }
 
Parameter
NameDescription
requestUpdateExternalSystemRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ExternalSystem

updateExternalSystemCallable()

public final UnaryCallable<UpdateExternalSystemRequest,ExternalSystem> updateExternalSystemCallable()

Updates external system. This is for a given finding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateExternalSystemRequest request =
       UpdateExternalSystemRequest.newBuilder()
           .setExternalSystem(ExternalSystem.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<ExternalSystem> future =
       securityCenterClient.updateExternalSystemCallable().futureCall(request);
   // Do something.
   ExternalSystem response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateExternalSystemRequest,ExternalSystem>

updateFinding(Finding finding)

public final Finding updateFinding(Finding finding)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   Finding finding = Finding.newBuilder().build();
   Finding response = securityCenterClient.updateFinding(finding);
 }
 
Parameter
NameDescription
findingFinding

Required. The finding resource to update or create if it does not already exist. parent, security_marks, and update_time will be ignored.

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

Returns
TypeDescription
Finding

updateFinding(UpdateFindingRequest request)

public final Finding updateFinding(UpdateFindingRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateFindingRequest request =
       UpdateFindingRequest.newBuilder()
           .setFinding(Finding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Finding response = securityCenterClient.updateFinding(request);
 }
 
Parameter
NameDescription
requestUpdateFindingRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Finding

updateFindingCallable()

public final UnaryCallable<UpdateFindingRequest,Finding> updateFindingCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateFindingRequest request =
       UpdateFindingRequest.newBuilder()
           .setFinding(Finding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Finding> future = securityCenterClient.updateFindingCallable().futureCall(request);
   // Do something.
   Finding response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateFindingRequest,Finding>

updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask)

public final MuteConfig updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask)

Updates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   MuteConfig muteConfig = MuteConfig.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   MuteConfig response = securityCenterClient.updateMuteConfig(muteConfig, updateMask);
 }
 
Parameters
NameDescription
muteConfigMuteConfig

Required. The mute config being updated.

updateMaskFieldMask

The list of fields to be updated. If empty all mutable fields will be updated.

Returns
TypeDescription
MuteConfig

updateMuteConfig(UpdateMuteConfigRequest request)

public final MuteConfig updateMuteConfig(UpdateMuteConfigRequest request)

Updates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateMuteConfigRequest request =
       UpdateMuteConfigRequest.newBuilder()
           .setMuteConfig(MuteConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   MuteConfig response = securityCenterClient.updateMuteConfig(request);
 }
 
Parameter
NameDescription
requestUpdateMuteConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
MuteConfig

updateMuteConfigCallable()

public final UnaryCallable<UpdateMuteConfigRequest,MuteConfig> updateMuteConfigCallable()

Updates a mute config.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateMuteConfigRequest request =
       UpdateMuteConfigRequest.newBuilder()
           .setMuteConfig(MuteConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<MuteConfig> future =
       securityCenterClient.updateMuteConfigCallable().futureCall(request);
   // Do something.
   MuteConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateMuteConfigRequest,MuteConfig>

updateNotificationConfig(NotificationConfig notificationConfig)

public final NotificationConfig updateNotificationConfig(NotificationConfig notificationConfig)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.updateNotificationConfig(notificationConfig);
 }
 
Parameter
NameDescription
notificationConfigNotificationConfig

Required. The notification config to update.

Returns
TypeDescription
NotificationConfig

updateNotificationConfig(NotificationConfig notificationConfig, FieldMask updateMask)

public final NotificationConfig updateNotificationConfig(NotificationConfig notificationConfig, FieldMask updateMask)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   NotificationConfig response =
       securityCenterClient.updateNotificationConfig(notificationConfig, updateMask);
 }
 
Parameters
NameDescription
notificationConfigNotificationConfig

Required. The notification config to update.

updateMaskFieldMask

The FieldMask to use when updating the notification config.

If empty all mutable fields will be updated.

Returns
TypeDescription
NotificationConfig

updateNotificationConfig(UpdateNotificationConfigRequest request)

public final NotificationConfig updateNotificationConfig(UpdateNotificationConfigRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateNotificationConfigRequest request =
       UpdateNotificationConfigRequest.newBuilder()
           .setNotificationConfig(NotificationConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   NotificationConfig response = securityCenterClient.updateNotificationConfig(request);
 }
 
Parameter
NameDescription
requestUpdateNotificationConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NotificationConfig

updateNotificationConfigCallable()

public final UnaryCallable<UpdateNotificationConfigRequest,NotificationConfig> updateNotificationConfigCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateNotificationConfigRequest request =
       UpdateNotificationConfigRequest.newBuilder()
           .setNotificationConfig(NotificationConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<NotificationConfig> future =
       securityCenterClient.updateNotificationConfigCallable().futureCall(request);
   // Do something.
   NotificationConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateNotificationConfigRequest,NotificationConfig>

updateOrganizationSettings(OrganizationSettings organizationSettings)

public final OrganizationSettings updateOrganizationSettings(OrganizationSettings organizationSettings)

Updates an organization's settings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   OrganizationSettings organizationSettings = OrganizationSettings.newBuilder().build();
   OrganizationSettings response =
       securityCenterClient.updateOrganizationSettings(organizationSettings);
 }
 
Parameter
NameDescription
organizationSettingsOrganizationSettings

Required. The organization settings resource to update.

Returns
TypeDescription
OrganizationSettings

updateOrganizationSettings(UpdateOrganizationSettingsRequest request)

public final OrganizationSettings updateOrganizationSettings(UpdateOrganizationSettingsRequest request)

Updates an organization's settings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateOrganizationSettingsRequest request =
       UpdateOrganizationSettingsRequest.newBuilder()
           .setOrganizationSettings(OrganizationSettings.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OrganizationSettings response = securityCenterClient.updateOrganizationSettings(request);
 }
 
Parameter
NameDescription
requestUpdateOrganizationSettingsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OrganizationSettings

updateOrganizationSettingsCallable()

public final UnaryCallable<UpdateOrganizationSettingsRequest,OrganizationSettings> updateOrganizationSettingsCallable()

Updates an organization's settings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateOrganizationSettingsRequest request =
       UpdateOrganizationSettingsRequest.newBuilder()
           .setOrganizationSettings(OrganizationSettings.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<OrganizationSettings> future =
       securityCenterClient.updateOrganizationSettingsCallable().futureCall(request);
   // Do something.
   OrganizationSettings response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateOrganizationSettingsRequest,OrganizationSettings>

updateSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule, FieldMask updateMask)

public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule, FieldMask updateMask)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
       SecurityHealthAnalyticsCustomModule.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.updateSecurityHealthAnalyticsCustomModule(
           securityHealthAnalyticsCustomModule, updateMask);
 }
 
Parameters
NameDescription
securityHealthAnalyticsCustomModuleSecurityHealthAnalyticsCustomModule

Required. The SecurityHealthAnalytics custom module to update.

updateMaskFieldMask

The list of fields to update.

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest request)

public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateSecurityHealthAnalyticsCustomModuleRequest request =
       UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setSecurityHealthAnalyticsCustomModule(
               SecurityHealthAnalyticsCustomModule.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.updateSecurityHealthAnalyticsCustomModule(request);
 }
 
Parameter
NameDescription
requestUpdateSecurityHealthAnalyticsCustomModuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityHealthAnalyticsCustomModule

updateSecurityHealthAnalyticsCustomModuleCallable()

public final UnaryCallable<UpdateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> updateSecurityHealthAnalyticsCustomModuleCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateSecurityHealthAnalyticsCustomModuleRequest request =
       UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
           .setSecurityHealthAnalyticsCustomModule(
               SecurityHealthAnalyticsCustomModule.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<SecurityHealthAnalyticsCustomModule> future =
       securityCenterClient
           .updateSecurityHealthAnalyticsCustomModuleCallable()
           .futureCall(request);
   // Do something.
   SecurityHealthAnalyticsCustomModule response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule>

updateSecurityMarks(SecurityMarks securityMarks)

public final SecurityMarks updateSecurityMarks(SecurityMarks securityMarks)

Updates security marks.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityMarks securityMarks = SecurityMarks.newBuilder().build();
   SecurityMarks response = securityCenterClient.updateSecurityMarks(securityMarks);
 }
 
Parameter
NameDescription
securityMarksSecurityMarks

Required. The security marks resource to update.

Returns
TypeDescription
SecurityMarks

updateSecurityMarks(UpdateSecurityMarksRequest request)

public final SecurityMarks updateSecurityMarks(UpdateSecurityMarksRequest request)

Updates security marks.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateSecurityMarksRequest request =
       UpdateSecurityMarksRequest.newBuilder()
           .setSecurityMarks(SecurityMarks.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setStartTime(Timestamp.newBuilder().build())
           .build();
   SecurityMarks response = securityCenterClient.updateSecurityMarks(request);
 }
 
Parameter
NameDescription
requestUpdateSecurityMarksRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecurityMarks

updateSecurityMarksCallable()

public final UnaryCallable<UpdateSecurityMarksRequest,SecurityMarks> updateSecurityMarksCallable()

Updates security marks.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateSecurityMarksRequest request =
       UpdateSecurityMarksRequest.newBuilder()
           .setSecurityMarks(SecurityMarks.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setStartTime(Timestamp.newBuilder().build())
           .build();
   ApiFuture<SecurityMarks> future =
       securityCenterClient.updateSecurityMarksCallable().futureCall(request);
   // Do something.
   SecurityMarks response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateSecurityMarksRequest,SecurityMarks>

updateSource(Source source)

public final Source updateSource(Source source)

Updates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   Source source = Source.newBuilder().build();
   Source response = securityCenterClient.updateSource(source);
 }
 
Parameter
NameDescription
sourceSource

Required. The source resource to update.

Returns
TypeDescription
Source

updateSource(UpdateSourceRequest request)

public final Source updateSource(UpdateSourceRequest request)

Updates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateSourceRequest request =
       UpdateSourceRequest.newBuilder()
           .setSource(Source.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Source response = securityCenterClient.updateSource(request);
 }
 
Parameter
NameDescription
requestUpdateSourceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Source

updateSourceCallable()

public final UnaryCallable<UpdateSourceRequest,Source> updateSourceCallable()

Updates a source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   UpdateSourceRequest request =
       UpdateSourceRequest.newBuilder()
           .setSource(Source.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Source> future = securityCenterClient.updateSourceCallable().futureCall(request);
   // Do something.
   Source response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateSourceRequest,Source>