Service Description: V2 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");Listrequests=newArrayList<>();BatchCreateResourceValueConfigsResponseresponse=securityCenterClient.batchCreateResourceValueConfigs(parent,requests);}
Note: close() needs to be called on the SecurityCenterClient object to clean up resources such
as threads. In the example above, try-with-resources is used, which automatically calls close().
Methods
Method
Description
Method Variants
BatchCreateResourceValueConfigs
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
batchCreateResourceValueConfigs(OrganizationLocationName parent, List requests)
batchCreateResourceValueConfigs(OrganizationName parent, List requests)
batchCreateResourceValueConfigs(String parent, List requests)
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
batchCreateResourceValueConfigsCallable()
BulkMuteFindings
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is specified, findings are muted in global. The parent can be either an organization, folder, or project. The findings matched by the filter will be muted after the LRO is done.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
getResourceValueConfigCallable()
GetSource
Gets a source.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
getSource(GetSourceRequest request)
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
getSource(SourceName name)
getSource(String name)
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
getSourceCallable()
GroupFindings
Filters an organization or source's findings and groups them by their specified properties in a location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id. The following list shows some examples:
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
listAttackPathsPagedCallable()
listAttackPathsCallable()
ListBigQueryExports
Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
listBigQueryExportsPagedCallable()
listBigQueryExportsCallable()
ListFindings
Lists an organization or source's findings.
To list across all sources for a given location provide a - as the source id. If no location is specified, finding are assumed to be in global. The following list shows some examples:
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
updateExternalSystemCallable()
UpdateFinding
Creates or updates a finding. If no location is specified, finding is assumed to be in global. The corresponding source must exist for a finding creation to succeed.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
updateFinding(UpdateFindingRequest request)
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
updateResourceValueConfigCallable()
UpdateSecurityMarks
Updates security marks. For Finding Security marks, if no location is specified, finding is assumed to be in global. Assets Security Marks can only be accessed through global endpoint.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
updateSecurityMarksCallable()
UpdateSource
Updates a source.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
updateSource(UpdateSourceRequest request)
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
updateSource(Source source, FieldMask updateMask)
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
updateSourceCallable()
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_librarySecurityCenterSettingssecurityCenterSettings=SecurityCenterSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();SecurityCenterClientsecurityCenterClient=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_librarySecurityCenterSettingssecurityCenterSettings=SecurityCenterSettings.newBuilder().setEndpoint(myEndpoint).build();SecurityCenterClientsecurityCenterClient=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_librarySecurityCenterSettingssecurityCenterSettings=SecurityCenterSettings.newHttpJsonBuilder().build();SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create(securityCenterSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
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.
Constructs an instance of SecurityCenterClient, using the given stub for making calls. This is
for advanced usage - prefer using create(SecurityCenterSettings).
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.
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource
values for use by the attack path simulation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");Listrequests=newArrayList<>();BatchCreateResourceValueConfigsResponseresponse=securityCenterClient.batchCreateResourceValueConfigs(parent,requests);}
Required. Resource name of the new ResourceValueConfig's parent. The parent field
in the CreateResourceValueConfigRequest messages must either be empty or match this field.
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource
values for use by the attack path simulation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationNameparent=OrganizationName.of("[ORGANIZATION]");Listrequests=newArrayList<>();BatchCreateResourceValueConfigsResponseresponse=securityCenterClient.batchCreateResourceValueConfigs(parent,requests);}
Required. Resource name of the new ResourceValueConfig's parent. The parent field
in the CreateResourceValueConfigRequest messages must either be empty or match this field.
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource
values for use by the attack path simulation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BatchCreateResourceValueConfigsRequestrequest=BatchCreateResourceValueConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).addAllRequests(newArrayList()).build();BatchCreateResourceValueConfigsResponseresponse=securityCenterClient.batchCreateResourceValueConfigs(request);}
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource
values for use by the attack path simulation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationName.of("[ORGANIZATION]").toString();Listrequests=newArrayList<>();BatchCreateResourceValueConfigsResponseresponse=securityCenterClient.batchCreateResourceValueConfigs(parent,requests);}
Required. Resource name of the new ResourceValueConfig's parent. The parent field
in the CreateResourceValueConfigRequest messages must either be empty or match this field.
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource
values for use by the attack path simulation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BatchCreateResourceValueConfigsRequestrequest=BatchCreateResourceValueConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).addAllRequests(newArrayList()).build();ApiFuturefuture=securityCenterClient.batchCreateResourceValueConfigsCallable().futureCall(request);// Do something.BatchCreateResourceValueConfigsResponseresponse=future.get();}
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is
specified, findings are muted in global. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceNameparent=FolderName.of("[FOLDER]");BulkMuteFindingsResponseresponse=securityCenterClient.bulkMuteFindingsAsync(parent).get();}
Required. The parent, at which bulk action needs to be applied. If no location is
specified, findings are updated in global. The following list shows some examples:
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is
specified, findings are muted in global. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BulkMuteFindingsRequestrequest=BulkMuteFindingsRequest.newBuilder().setParent(FolderName.of("[FOLDER]").toString()).setFilter("filter-1274492040").build();BulkMuteFindingsResponseresponse=securityCenterClient.bulkMuteFindingsAsync(request).get();}
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is
specified, findings are muted in global. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=FolderName.of("[FOLDER]").toString();BulkMuteFindingsResponseresponse=securityCenterClient.bulkMuteFindingsAsync(parent).get();}
Required. The parent, at which bulk action needs to be applied. If no location is
specified, findings are updated in global. The following list shows some examples:
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is
specified, findings are muted in global. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BulkMuteFindingsRequestrequest=BulkMuteFindingsRequest.newBuilder().setParent(FolderName.of("[FOLDER]").toString()).setFilter("filter-1274492040").build();ApiFuturefuture=securityCenterClient.bulkMuteFindingsCallable().futureCall(request);// Do something.Operationresponse=future.get();}
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is
specified, findings are muted in global. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BulkMuteFindingsRequestrequest=BulkMuteFindingsRequest.newBuilder().setParent(FolderName.of("[FOLDER]").toString()).setFilter("filter-1274492040").build();OperationFuture,Empty>future=securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request);// Do something.BulkMuteFindingsResponseresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderLocationNameparent=FolderLocationName.of("[FOLDER]","[LOCATION]");BigQueryExportbigQueryExport=BigQueryExport.newBuilder().build();StringbigQueryExportId="bigQueryExportId1024198583";BigQueryExportresponse=securityCenterClient.createBigQueryExport(parent,bigQueryExport,bigQueryExportId);}
Required. The name of the parent resource of the new BigQuery export. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");BigQueryExportbigQueryExport=BigQueryExport.newBuilder().build();StringbigQueryExportId="bigQueryExportId1024198583";BigQueryExportresponse=securityCenterClient.createBigQueryExport(parent,bigQueryExport,bigQueryExportId);}
Required. The name of the parent resource of the new BigQuery export. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");BigQueryExportbigQueryExport=BigQueryExport.newBuilder().build();StringbigQueryExportId="bigQueryExportId1024198583";BigQueryExportresponse=securityCenterClient.createBigQueryExport(parent,bigQueryExport,bigQueryExportId);}
Required. The name of the parent resource of the new BigQuery export. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateBigQueryExportRequestrequest=CreateBigQueryExportRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setBigQueryExport(BigQueryExport.newBuilder().build()).setBigQueryExportId("bigQueryExportId1024198583").build();BigQueryExportresponse=securityCenterClient.createBigQueryExport(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString();BigQueryExportbigQueryExport=BigQueryExport.newBuilder().build();StringbigQueryExportId="bigQueryExportId1024198583";BigQueryExportresponse=securityCenterClient.createBigQueryExport(parent,bigQueryExport,bigQueryExportId);}
Required. The name of the parent resource of the new BigQuery export. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateBigQueryExportRequestrequest=CreateBigQueryExportRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setBigQueryExport(BigQueryExport.newBuilder().build()).setBigQueryExportId("bigQueryExportId1024198583").build();ApiFuturefuture=securityCenterClient.createBigQueryExportCallable().futureCall(request);// Do something.BigQueryExportresponse=future.get();}
Creates a finding in a location. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SourceNameparent=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");Findingfinding=Finding.newBuilder().build();StringfindingId="findingId439150212";Findingresponse=securityCenterClient.createFinding(parent,finding,findingId);}
Required. Resource name of the new finding's parent. The following list shows
some examples of the format: + organizations/[organization_id]/sources/[source_id] +
organizations/[organization_id]/sources/[source_id]/locations/[location_id]
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.
Creates a finding in a location. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateFindingRequestrequest=CreateFindingRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFindingId("findingId439150212").setFinding(Finding.newBuilder().build()).build();Findingresponse=securityCenterClient.createFinding(request);}
Creates a finding in a location. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString();Findingfinding=Finding.newBuilder().build();StringfindingId="findingId439150212";Findingresponse=securityCenterClient.createFinding(parent,finding,findingId);}
Required. Resource name of the new finding's parent. The following list shows
some examples of the format: + organizations/[organization_id]/sources/[source_id] +
organizations/[organization_id]/sources/[source_id]/locations/[location_id]
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.
Creates a finding in a location. 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateFindingRequestrequest=CreateFindingRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFindingId("findingId439150212").setFinding(Finding.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.createFindingCallable().futureCall(request);// Do something.Findingresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderLocationNameparent=FolderLocationName.of("[FOLDER]","[LOCATION]");MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderNameparent=FolderName.of("[FOLDER]");MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationNameparent=OrganizationName.of("[ORGANIZATION]");MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ProjectNameparent=ProjectName.of("[PROJECT]");MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateMuteConfigRequestrequest=CreateMuteConfigRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setMuteConfig(MuteConfig.newBuilder().build()).setMuteConfigId("muteConfigId1689669942").build();MuteConfigresponse=securityCenterClient.createMuteConfig(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationName.of("[ORGANIZATION]").toString();MuteConfigmuteConfig=MuteConfig.newBuilder().build();StringmuteConfigId="muteConfigId1689669942";MuteConfigresponse=securityCenterClient.createMuteConfig(parent,muteConfig,muteConfigId);}
Required. Resource name of the new mute configs's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateMuteConfigRequestrequest=CreateMuteConfigRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setMuteConfig(MuteConfig.newBuilder().build()).setMuteConfigId("muteConfigId1689669942").build();ApiFuturefuture=securityCenterClient.createMuteConfigCallable().futureCall(request);// Do something.MuteConfigresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderLocationNameparent=FolderLocationName.of("[FOLDER]","[LOCATION]");NotificationConfignotificationConfig=NotificationConfig.newBuilder().build();StringconfigId="configId-580140035";NotificationConfigresponse=securityCenterClient.createNotificationConfig(parent,notificationConfig,configId);}
Required. Resource name of the new notification config's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");NotificationConfignotificationConfig=NotificationConfig.newBuilder().build();StringconfigId="configId-580140035";NotificationConfigresponse=securityCenterClient.createNotificationConfig(parent,notificationConfig,configId);}
Required. Resource name of the new notification config's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");NotificationConfignotificationConfig=NotificationConfig.newBuilder().build();StringconfigId="configId-580140035";NotificationConfigresponse=securityCenterClient.createNotificationConfig(parent,notificationConfig,configId);}
Required. Resource name of the new notification config's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateNotificationConfigRequestrequest=CreateNotificationConfigRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setConfigId("configId-580140035").setNotificationConfig(NotificationConfig.newBuilder().build()).build();NotificationConfigresponse=securityCenterClient.createNotificationConfig(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString();NotificationConfignotificationConfig=NotificationConfig.newBuilder().build();StringconfigId="configId-580140035";NotificationConfigresponse=securityCenterClient.createNotificationConfig(parent,notificationConfig,configId);}
Required. Resource name of the new notification config's parent. Its format is
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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.
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.
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateNotificationConfigRequestrequest=CreateNotificationConfigRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setConfigId("configId-580140035").setNotificationConfig(NotificationConfig.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.createNotificationConfigCallable().futureCall(request);// Do something.NotificationConfigresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationNameparent=OrganizationName.of("[ORGANIZATION]");Sourcesource=Source.newBuilder().build();Sourceresponse=securityCenterClient.createSource(parent,source);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateSourceRequestrequest=CreateSourceRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setSource(Source.newBuilder().build()).build();Sourceresponse=securityCenterClient.createSource(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationName.of("[ORGANIZATION]").toString();Sourcesource=Source.newBuilder().build();Sourceresponse=securityCenterClient.createSource(parent,source);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){CreateSourceRequestrequest=CreateSourceRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setSource(Source.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.createSourceCallable().futureCall(request);// Do something.Sourceresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BigQueryExportNamename=BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]");securityCenterClient.deleteBigQueryExport(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteBigQueryExportRequestrequest=DeleteBigQueryExportRequest.newBuilder().setName(BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]").toString()).build();securityCenterClient.deleteBigQueryExport(request);}
The request object containing all of the parameters for the API call.
deleteBigQueryExport(String name)
publicfinalvoiddeleteBigQueryExport(Stringname)
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]").toString();securityCenterClient.deleteBigQueryExport(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteBigQueryExportRequestrequest=DeleteBigQueryExportRequest.newBuilder().setName(BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]").toString()).build();ApiFuturefuture=securityCenterClient.deleteBigQueryExportCallable().futureCall(request);// Do something.future.get();}
Deletes an existing mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){MuteConfigNamename=MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]");securityCenterClient.deleteMuteConfig(name);}
Deletes an existing mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteMuteConfigRequestrequest=DeleteMuteConfigRequest.newBuilder().setName(MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]").toString()).build();securityCenterClient.deleteMuteConfig(request);}
The request object containing all of the parameters for the API call.
deleteMuteConfig(String name)
publicfinalvoiddeleteMuteConfig(Stringname)
Deletes an existing mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]").toString();securityCenterClient.deleteMuteConfig(name);}
Deletes an existing mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteMuteConfigRequestrequest=DeleteMuteConfigRequest.newBuilder().setName(MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]").toString()).build();ApiFuturefuture=securityCenterClient.deleteMuteConfigCallable().futureCall(request);// Do something.future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){NotificationConfigNamename=NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]");securityCenterClient.deleteNotificationConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteNotificationConfigRequestrequest=DeleteNotificationConfigRequest.newBuilder().setName(NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]").toString()).build();securityCenterClient.deleteNotificationConfig(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]").toString();securityCenterClient.deleteNotificationConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteNotificationConfigRequestrequest=DeleteNotificationConfigRequest.newBuilder().setName(NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]").toString()).build();ApiFuturefuture=securityCenterClient.deleteNotificationConfigCallable().futureCall(request);// Do something.future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceValueConfigNamename=ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]");securityCenterClient.deleteResourceValueConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteResourceValueConfigRequestrequest=DeleteResourceValueConfigRequest.newBuilder().setName(ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]").toString()).build();securityCenterClient.deleteResourceValueConfig(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]").toString();securityCenterClient.deleteResourceValueConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){DeleteResourceValueConfigRequestrequest=DeleteResourceValueConfigRequest.newBuilder().setName(ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]").toString()).build();ApiFuturefuture=securityCenterClient.deleteResourceValueConfigCallable().futureCall(request);// Do something.future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BigQueryExportNamename=BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]");BigQueryExportresponse=securityCenterClient.getBigQueryExport(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetBigQueryExportRequestrequest=GetBigQueryExportRequest.newBuilder().setName(BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]").toString()).build();BigQueryExportresponse=securityCenterClient.getBigQueryExport(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]").toString();BigQueryExportresponse=securityCenterClient.getBigQueryExport(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetBigQueryExportRequestrequest=GetBigQueryExportRequest.newBuilder().setName(BigQueryExportName.ofOrganizationLocationExportName("[ORGANIZATION]","[LOCATION]","[EXPORT]").toString()).build();ApiFuturefuture=securityCenterClient.getBigQueryExportCallable().futureCall(request);// Do something.BigQueryExportresponse=future.get();}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceNameresource=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");Policyresponse=securityCenterClient.getIamPolicy(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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetIamPolicyRequestrequest=GetIamPolicyRequest.newBuilder().setResource(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setOptions(GetPolicyOptions.newBuilder().build()).build();Policyresponse=securityCenterClient.getIamPolicy(request);}
Parameter
Name
Description
request
com.google.iam.v1.GetIamPolicyRequest
The request object containing all of the parameters for the API call.
Returns
Type
Description
com.google.iam.v1.Policy
getIamPolicy(String resource)
publicfinalPolicygetIamPolicy(Stringresource)
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringresource=FolderName.of("[FOLDER]").toString();Policyresponse=securityCenterClient.getIamPolicy(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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetIamPolicyRequestrequest=GetIamPolicyRequest.newBuilder().setResource(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setOptions(GetPolicyOptions.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.getIamPolicyCallable().futureCall(request);// Do something.Policyresponse=future.get();}
Gets a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){MuteConfigNamename=MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]");MuteConfigresponse=securityCenterClient.getMuteConfig(name);}
Gets a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetMuteConfigRequestrequest=GetMuteConfigRequest.newBuilder().setName(MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]").toString()).build();MuteConfigresponse=securityCenterClient.getMuteConfig(request);}
Gets a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]").toString();MuteConfigresponse=securityCenterClient.getMuteConfig(name);}
Gets a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetMuteConfigRequestrequest=GetMuteConfigRequest.newBuilder().setName(MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]","[MUTE_CONFIG]").toString()).build();ApiFuturefuture=securityCenterClient.getMuteConfigCallable().futureCall(request);// Do something.MuteConfigresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){NotificationConfigNamename=NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]");NotificationConfigresponse=securityCenterClient.getNotificationConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetNotificationConfigRequestrequest=GetNotificationConfigRequest.newBuilder().setName(NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]").toString()).build();NotificationConfigresponse=securityCenterClient.getNotificationConfig(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]").toString();NotificationConfigresponse=securityCenterClient.getNotificationConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetNotificationConfigRequestrequest=GetNotificationConfigRequest.newBuilder().setName(NotificationConfigName.ofOrganizationLocationNotificationConfigName("[ORGANIZATION]","[LOCATION]","[NOTIFICATION_CONFIG]").toString()).build();ApiFuturefuture=securityCenterClient.getNotificationConfigCallable().futureCall(request);// Do something.NotificationConfigresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceValueConfigNamename=ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]");ResourceValueConfigresponse=securityCenterClient.getResourceValueConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetResourceValueConfigRequestrequest=GetResourceValueConfigRequest.newBuilder().setName(ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]").toString()).build();ResourceValueConfigresponse=securityCenterClient.getResourceValueConfig(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]").toString();ResourceValueConfigresponse=securityCenterClient.getResourceValueConfig(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetResourceValueConfigRequestrequest=GetResourceValueConfigRequest.newBuilder().setName(ResourceValueConfigName.ofOrganizationResourceValueConfigName("[ORGANIZATION]","[RESOURCE_VALUE_CONFIG]").toString()).build();ApiFuturefuture=securityCenterClient.getResourceValueConfigCallable().futureCall(request);// Do something.ResourceValueConfigresponse=future.get();}
Get the simulation by name or the latest simulation for the given organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SimulationNamename=SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]");Simulationresponse=securityCenterClient.getSimulation(name);}
Get the simulation by name or the latest simulation for the given organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetSimulationRequestrequest=GetSimulationRequest.newBuilder().setName(SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString()).build();Simulationresponse=securityCenterClient.getSimulation(request);}
Get the simulation by name or the latest simulation for the given organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString();Simulationresponse=securityCenterClient.getSimulation(name);}
Get the simulation by name or the latest simulation for the given organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetSimulationRequestrequest=GetSimulationRequest.newBuilder().setName(SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString()).build();ApiFuturefuture=securityCenterClient.getSimulationCallable().futureCall(request);// Do something.Simulationresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SourceNamename=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");Sourceresponse=securityCenterClient.getSource(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetSourceRequestrequest=GetSourceRequest.newBuilder().setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).build();Sourceresponse=securityCenterClient.getSource(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString();Sourceresponse=securityCenterClient.getSource(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetSourceRequestrequest=GetSourceRequest.newBuilder().setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).build();ApiFuturefuture=securityCenterClient.getSourceCallable().futureCall(request);// Do something.Sourceresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ValuedResourceNamename=ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]");ValuedResourceresponse=securityCenterClient.getValuedResource(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetValuedResourceRequestrequest=GetValuedResourceRequest.newBuilder().setName(ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString()).build();ValuedResourceresponse=securityCenterClient.getValuedResource(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString();ValuedResourceresponse=securityCenterClient.getValuedResource(name);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GetValuedResourceRequestrequest=GetValuedResourceRequest.newBuilder().setName(ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString()).build();ApiFuturefuture=securityCenterClient.getValuedResourceCallable().futureCall(request);// Do something.ValuedResourceresponse=future.get();}
Filters an organization or source's findings and groups them by their specified properties in a
location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SourceNameparent=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");StringgroupBy="groupBy293428022";for(GroupResultelement:securityCenterClient.groupFindings(parent,groupBy).iterateAll()){// doThingsWith(element);}}
Required. Expression that defines what assets fields to use for grouping. The
string value should follow SQL syntax: comma separated list of fields. For example:
"parent,resource_name".
Filters an organization or source's findings and groups them by their specified properties in a
location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GroupFindingsRequestrequest=GroupFindingsRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFilter("filter-1274492040").setGroupBy("groupBy293428022").setPageToken("pageToken873572522").setPageSize(883849137).build();for(GroupResultelement:securityCenterClient.groupFindings(request).iterateAll()){// doThingsWith(element);}}
Filters an organization or source's findings and groups them by their specified properties in a
location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString();StringgroupBy="groupBy293428022";for(GroupResultelement:securityCenterClient.groupFindings(parent,groupBy).iterateAll()){// doThingsWith(element);}}
Required. Expression that defines what assets fields to use for grouping. The
string value should follow SQL syntax: comma separated list of fields. For example:
"parent,resource_name".
Filters an organization or source's findings and groups them by their specified properties in a
location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GroupFindingsRequestrequest=GroupFindingsRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFilter("filter-1274492040").setGroupBy("groupBy293428022").setPageToken("pageToken873572522").setPageSize(883849137).build();while(true){GroupFindingsResponseresponse=securityCenterClient.groupFindingsCallable().call(request);for(GroupResultelement:response.getGroupByResultsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
Filters an organization or source's findings and groups them by their specified properties in a
location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){GroupFindingsRequestrequest=GroupFindingsRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFilter("filter-1274492040").setGroupBy("groupBy293428022").setPageToken("pageToken873572522").setPageSize(883849137).build();ApiFuturefuture=securityCenterClient.groupFindingsPagedCallable().futureCall(request);// Do something.for(GroupResultelement:future.get().iterateAll()){// doThingsWith(element);}}
Lists the attack paths for a set of simulation results or valued resources and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationValuedResourceNameparent=OrganizationValuedResourceName.of("[ORGANIZATION]","[LOCATION]","[SIMULATION]","[VALUED_RESOURCE]");for(AttackPathelement:securityCenterClient.listAttackPaths(parent).iterateAll()){// doThingsWith(element);}}
Lists the attack paths for a set of simulation results or valued resources and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ValuedResourceNameparent=ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]");for(AttackPathelement:securityCenterClient.listAttackPaths(parent).iterateAll()){// doThingsWith(element);}}
Lists the attack paths for a set of simulation results or valued resources and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListAttackPathsRequestrequest=ListAttackPathsRequest.newBuilder().setParent(ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString()).setFilter("filter-1274492040").setPageToken("pageToken873572522").setPageSize(883849137).build();for(AttackPathelement:securityCenterClient.listAttackPaths(request).iterateAll()){// doThingsWith(element);}}
Lists the attack paths for a set of simulation results or valued resources and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString();for(AttackPathelement:securityCenterClient.listAttackPaths(parent).iterateAll()){// doThingsWith(element);}}
Lists the attack paths for a set of simulation results or valued resources and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListAttackPathsRequestrequest=ListAttackPathsRequest.newBuilder().setParent(ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString()).setFilter("filter-1274492040").setPageToken("pageToken873572522").setPageSize(883849137).build();while(true){ListAttackPathsResponseresponse=securityCenterClient.listAttackPathsCallable().call(request);for(AttackPathelement:response.getAttackPathsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
Lists the attack paths for a set of simulation results or valued resources and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListAttackPathsRequestrequest=ListAttackPathsRequest.newBuilder().setParent(ValuedResourceName.ofOrganizationSimulationValuedResourceName("[ORGANIZATION]","[SIMULATION]","[VALUED_RESOURCE]").toString()).setFilter("filter-1274492040").setPageToken("pageToken873572522").setPageSize(883849137).build();ApiFuturefuture=securityCenterClient.listAttackPathsPagedCallable().futureCall(request);// Do something.for(AttackPathelement:future.get().iterateAll()){// doThingsWith(element);}}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderLocationNameparent=FolderLocationName.of("[FOLDER]","[LOCATION]");for(BigQueryExportelement:securityCenterClient.listBigQueryExports(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of BigQuery exports. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");for(BigQueryExportelement:securityCenterClient.listBigQueryExports(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of BigQuery exports. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");for(BigQueryExportelement:securityCenterClient.listBigQueryExports(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of BigQuery exports. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListBigQueryExportsRequestrequest=ListBigQueryExportsRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();for(BigQueryExportelement:securityCenterClient.listBigQueryExports(request).iterateAll()){// doThingsWith(element);}}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString();for(BigQueryExportelement:securityCenterClient.listBigQueryExports(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of BigQuery exports. Its format
is organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id], or
projects/[project_id]/locations/[location_id].
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListBigQueryExportsRequestrequest=ListBigQueryExportsRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();while(true){ListBigQueryExportsResponseresponse=securityCenterClient.listBigQueryExportsCallable().call(request);for(BigQueryExportelement:response.getBigQueryExportsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListBigQueryExportsRequestrequest=ListBigQueryExportsRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();ApiFuturefuture=securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request);// Do something.for(BigQueryExportelement:future.get().iterateAll()){// doThingsWith(element);}}
To list across all sources for a given location provide a - as the source id. If no
location is specified, finding are assumed to be in global. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SourceNameparent=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");for(ListFindingsResponse.ListFindingsResultelement:securityCenterClient.listFindings(parent).iterateAll()){// doThingsWith(element);}}
To list across all sources for a given location provide a - as the source id. If no
location is specified, finding are assumed to be in global. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListFindingsRequestrequest=ListFindingsRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFilter("filter-1274492040").setOrderBy("orderBy-1207110587").setFieldMask(FieldMask.newBuilder().build()).setPageToken("pageToken873572522").setPageSize(883849137).build();for(ListFindingsResponse.ListFindingsResultelement:securityCenterClient.listFindings(request).iterateAll()){// doThingsWith(element);}}
To list across all sources for a given location provide a - as the source id. If no
location is specified, finding are assumed to be in global. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString();for(ListFindingsResponse.ListFindingsResultelement:securityCenterClient.listFindings(parent).iterateAll()){// doThingsWith(element);}}
To list across all sources for a given location provide a - as the source id. If no
location is specified, finding are assumed to be in global. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListFindingsRequestrequest=ListFindingsRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFilter("filter-1274492040").setOrderBy("orderBy-1207110587").setFieldMask(FieldMask.newBuilder().build()).setPageToken("pageToken873572522").setPageSize(883849137).build();while(true){ListFindingsResponseresponse=securityCenterClient.listFindingsCallable().call(request);for(ListFindingsResponse.ListFindingsResultelement:response.getListFindingsResultsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
To list across all sources for a given location provide a - as the source id. If no
location is specified, finding are assumed to be in global. The following list shows some
examples:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListFindingsRequestrequest=ListFindingsRequest.newBuilder().setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setFilter("filter-1274492040").setOrderBy("orderBy-1207110587").setFieldMask(FieldMask.newBuilder().build()).setPageToken("pageToken873572522").setPageSize(883849137).build();ApiFuture.ListFindingsResult>future=securityCenterClient.listFindingsPagedCallable().futureCall(request);// Do something.for(ListFindingsResponse.ListFindingsResultelement:future.get().iterateAll()){// doThingsWith(element);}}
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderLocationNameparent=FolderLocationName.of("[FOLDER]","[LOCATION]");for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderNameparent=FolderName.of("[FOLDER]");for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationNameparent=OrganizationName.of("[ORGANIZATION]");for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ProjectNameparent=ProjectName.of("[PROJECT]");for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListMuteConfigsRequestrequest=ListMuteConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();for(MuteConfigelement:securityCenterClient.listMuteConfigs(request).iterateAll()){// doThingsWith(element);}}
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationName.of("[ORGANIZATION]").toString();for(MuteConfigelement:securityCenterClient.listMuteConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The parent, which owns the collection of mute configs. Its format is
organizations/[organization_id]", "folders/[folder_id], projects/[project_id],
organizations/[organization_id]/locations/[location_id],
folders/[folder_id]/locations/[location_id],
projects/[project_id]/locations/[location_id].
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListMuteConfigsRequestrequest=ListMuteConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();while(true){ListMuteConfigsResponseresponse=securityCenterClient.listMuteConfigsCallable().call(request);for(MuteConfigelement:response.getMuteConfigsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
Lists mute configs. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListMuteConfigsRequestrequest=ListMuteConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();ApiFuturefuture=securityCenterClient.listMuteConfigsPagedCallable().futureCall(request);// Do something.for(MuteConfigelement:future.get().iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderLocationNameparent=FolderLocationName.of("[FOLDER]","[LOCATION]");for(NotificationConfigelement:securityCenterClient.listNotificationConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The name of the parent in which to list the notification
configurations. Its format is "organizations/[organization_id]/locations/[location_id]",
"folders/[folder_id]/locations/[location_id]", or
"projects/[project_id]/locations/[location_id]".
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");for(NotificationConfigelement:securityCenterClient.listNotificationConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The name of the parent in which to list the notification
configurations. Its format is "organizations/[organization_id]/locations/[location_id]",
"folders/[folder_id]/locations/[location_id]", or
"projects/[project_id]/locations/[location_id]".
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");for(NotificationConfigelement:securityCenterClient.listNotificationConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The name of the parent in which to list the notification
configurations. Its format is "organizations/[organization_id]/locations/[location_id]",
"folders/[folder_id]/locations/[location_id]", or
"projects/[project_id]/locations/[location_id]".
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListNotificationConfigsRequestrequest=ListNotificationConfigsRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setPageToken("pageToken873572522").setPageSize(883849137).build();for(NotificationConfigelement:securityCenterClient.listNotificationConfigs(request).iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString();for(NotificationConfigelement:securityCenterClient.listNotificationConfigs(parent).iterateAll()){// doThingsWith(element);}}
Required. The name of the parent in which to list the notification
configurations. Its format is "organizations/[organization_id]/locations/[location_id]",
"folders/[folder_id]/locations/[location_id]", or
"projects/[project_id]/locations/[location_id]".
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListNotificationConfigsRequestrequest=ListNotificationConfigsRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setPageToken("pageToken873572522").setPageSize(883849137).build();while(true){ListNotificationConfigsResponseresponse=securityCenterClient.listNotificationConfigsCallable().call(request);for(NotificationConfigelement:response.getNotificationConfigsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListNotificationConfigsRequestrequest=ListNotificationConfigsRequest.newBuilder().setParent(OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]").toString()).setPageToken("pageToken873572522").setPageSize(883849137).build();ApiFuturefuture=securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request);// Do something.for(NotificationConfigelement:future.get().iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationLocationNameparent=OrganizationLocationName.of("[ORGANIZATION]","[LOCATION]");for(ResourceValueConfigelement:securityCenterClient.listResourceValueConfigs(parent).iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationNameparent=OrganizationName.of("[ORGANIZATION]");for(ResourceValueConfigelement:securityCenterClient.listResourceValueConfigs(parent).iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListResourceValueConfigsRequestrequest=ListResourceValueConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();for(ResourceValueConfigelement:securityCenterClient.listResourceValueConfigs(request).iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationName.of("[ORGANIZATION]").toString();for(ResourceValueConfigelement:securityCenterClient.listResourceValueConfigs(parent).iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListResourceValueConfigsRequestrequest=ListResourceValueConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();while(true){ListResourceValueConfigsResponseresponse=securityCenterClient.listResourceValueConfigsCallable().call(request);for(ResourceValueConfigelement:response.getResourceValueConfigsList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListResourceValueConfigsRequestrequest=ListResourceValueConfigsRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();ApiFuturefuture=securityCenterClient.listResourceValueConfigsPagedCallable().futureCall(request);// Do something.for(ResourceValueConfigelement:future.get().iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FolderNameparent=FolderName.of("[FOLDER]");for(Sourceelement:securityCenterClient.listSources(parent).iterateAll()){// doThingsWith(element);}}
Required. Resource name of the parent of sources to list. Its format should be
organizations/[organization_id], folders/[folder_id], or projects/[project_id].
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){OrganizationNameparent=OrganizationName.of("[ORGANIZATION]");for(Sourceelement:securityCenterClient.listSources(parent).iterateAll()){// doThingsWith(element);}}
Required. Resource name of the parent of sources to list. Its format should be
organizations/[organization_id], folders/[folder_id], or projects/[project_id].
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ProjectNameparent=ProjectName.of("[PROJECT]");for(Sourceelement:securityCenterClient.listSources(parent).iterateAll()){// doThingsWith(element);}}
Required. Resource name of the parent of sources to list. Its format should be
organizations/[organization_id], folders/[folder_id], or projects/[project_id].
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListSourcesRequestrequest=ListSourcesRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageToken("pageToken873572522").setPageSize(883849137).build();for(Sourceelement:securityCenterClient.listSources(request).iterateAll()){// doThingsWith(element);}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=OrganizationName.of("[ORGANIZATION]").toString();for(Sourceelement:securityCenterClient.listSources(parent).iterateAll()){// doThingsWith(element);}}
Required. Resource name of the parent of sources to list. Its format should be
organizations/[organization_id], folders/[folder_id], or projects/[project_id].
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListSourcesRequestrequest=ListSourcesRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageToken("pageToken873572522").setPageSize(883849137).build();while(true){ListSourcesResponseresponse=securityCenterClient.listSourcesCallable().call(request);for(Sourceelement:response.getSourcesList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListSourcesRequestrequest=ListSourcesRequest.newBuilder().setParent(OrganizationName.of("[ORGANIZATION]").toString()).setPageToken("pageToken873572522").setPageSize(883849137).build();ApiFuturefuture=securityCenterClient.listSourcesPagedCallable().futureCall(request);// Do something.for(Sourceelement:future.get().iterateAll()){// doThingsWith(element);}}
Lists the valued resources for a set of simulation results and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SimulationNameparent=SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]");for(ValuedResourceelement:securityCenterClient.listValuedResources(parent).iterateAll()){// doThingsWith(element);}}
Lists the valued resources for a set of simulation results and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListValuedResourcesRequestrequest=ListValuedResourcesRequest.newBuilder().setParent(SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString()).setFilter("filter-1274492040").setPageToken("pageToken873572522").setPageSize(883849137).setOrderBy("orderBy-1207110587").build();for(ValuedResourceelement:securityCenterClient.listValuedResources(request).iterateAll()){// doThingsWith(element);}}
Lists the valued resources for a set of simulation results and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringparent=SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString();for(ValuedResourceelement:securityCenterClient.listValuedResources(parent).iterateAll()){// doThingsWith(element);}}
Lists the valued resources for a set of simulation results and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListValuedResourcesRequestrequest=ListValuedResourcesRequest.newBuilder().setParent(SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString()).setFilter("filter-1274492040").setPageToken("pageToken873572522").setPageSize(883849137).setOrderBy("orderBy-1207110587").build();while(true){ListValuedResourcesResponseresponse=securityCenterClient.listValuedResourcesCallable().call(request);for(ValuedResourceelement:response.getValuedResourcesList()){// doThingsWith(element);}StringnextPageToken=response.getNextPageToken();if(!Strings.isNullOrEmpty(nextPageToken)){request=request.toBuilder().setPageToken(nextPageToken).build();}else{break;}}}
Lists the valued resources for a set of simulation results and filter.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ListValuedResourcesRequestrequest=ListValuedResourcesRequest.newBuilder().setParent(SimulationName.ofOrganizationSimulationName("[ORGANIZATION]","[SIMULATION]").toString()).setFilter("filter-1274492040").setPageToken("pageToken873572522").setPageSize(883849137).setOrderBy("orderBy-1207110587").build();ApiFuturefuture=securityCenterClient.listValuedResourcesPagedCallable().futureCall(request);// Do something.for(ValuedResourceelement:future.get().iterateAll()){// doThingsWith(element);}}
Updates the state of a finding. If no location is specified, finding is assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FindingNamename=FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]");Finding.Statestate=Finding.State.forNumber(0);Findingresponse=securityCenterClient.setFindingState(name,state);}
Required. The relative resource
name of the
finding. If no location is specified, finding is assumed to be in global. The following
list shows some examples:
Updates the state of a finding. If no location is specified, finding is assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SetFindingStateRequestrequest=SetFindingStateRequest.newBuilder().setName(FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]").toString()).build();Findingresponse=securityCenterClient.setFindingState(request);}
Updates the state of a finding. If no location is specified, finding is assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]").toString();Finding.Statestate=Finding.State.forNumber(0);Findingresponse=securityCenterClient.setFindingState(name,state);}
Required. The relative resource
name of the
finding. If no location is specified, finding is assumed to be in global. The following
list shows some examples:
Updates the state of a finding. If no location is specified, finding is assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SetFindingStateRequestrequest=SetFindingStateRequest.newBuilder().setName(FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]").toString()).build();ApiFuturefuture=securityCenterClient.setFindingStateCallable().futureCall(request);// Do something.Findingresponse=future.get();}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceNameresource=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");Policypolicy=Policy.newBuilder().build();Policyresponse=securityCenterClient.setIamPolicy(resource,policy);}
REQUIRED: The resource for which the policy is being specified. See the
operation documentation for the appropriate value for this field.
policy
com.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.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SetIamPolicyRequestrequest=SetIamPolicyRequest.newBuilder().setResource(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setPolicy(Policy.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();Policyresponse=securityCenterClient.setIamPolicy(request);}
Parameter
Name
Description
request
com.google.iam.v1.SetIamPolicyRequest
The request object containing all of the parameters for the API call.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringresource=FolderName.of("[FOLDER]").toString();Policypolicy=Policy.newBuilder().build();Policyresponse=securityCenterClient.setIamPolicy(resource,policy);}
REQUIRED: The resource for which the policy is being specified. See the
operation documentation for the appropriate value for this field.
policy
com.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.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SetIamPolicyRequestrequest=SetIamPolicyRequest.newBuilder().setResource(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).setPolicy(Policy.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.setIamPolicyCallable().futureCall(request);// Do something.Policyresponse=future.get();}
Updates the mute state of a finding. If no location is specified, finding is assumed to be in
global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){FindingNamename=FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]");Finding.Mutemute=Finding.Mute.forNumber(0);Findingresponse=securityCenterClient.setMute(name,mute);}
Required. The relative resource
name of the
finding. If no location is specified, finding is assumed to be in global. The following
list shows some examples:
Updates the mute state of a finding. If no location is specified, finding is assumed to be in
global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SetMuteRequestrequest=SetMuteRequest.newBuilder().setName(FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]").toString()).build();Findingresponse=securityCenterClient.setMute(request);}
Updates the mute state of a finding. If no location is specified, finding is assumed to be in
global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringname=FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]").toString();Finding.Mutemute=Finding.Mute.forNumber(0);Findingresponse=securityCenterClient.setMute(name,mute);}
Required. The relative resource
name of the
finding. If no location is specified, finding is assumed to be in global. The following
list shows some examples:
Updates the mute state of a finding. If no location is specified, finding is assumed to be in
global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SetMuteRequestrequest=SetMuteRequest.newBuilder().setName(FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]","[SOURCE]","[FINDING]").toString()).build();ApiFuturefuture=securityCenterClient.setMuteCallable().futureCall(request);// Do something.Findingresponse=future.get();}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceNameresource=SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]");Listpermissions=newArrayList<>();TestIamPermissionsResponseresponse=securityCenterClient.testIamPermissions(resource,permissions);}
The set of permissions to check for the resource. Permissions with
wildcards (such as '*' or 'storage.*') are not allowed. For more information see
IAM Overview.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){TestIamPermissionsRequestrequest=TestIamPermissionsRequest.newBuilder().setResource(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).addAllPermissions(newArrayList()).build();TestIamPermissionsResponseresponse=securityCenterClient.testIamPermissions(request);}
Parameter
Name
Description
request
com.google.iam.v1.TestIamPermissionsRequest
The request object containing all of the parameters for the API call.
Returns
Type
Description
com.google.iam.v1.TestIamPermissionsResponse
testIamPermissions(String resource, List 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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Stringresource=FolderName.of("[FOLDER]").toString();Listpermissions=newArrayList<>();TestIamPermissionsResponseresponse=securityCenterClient.testIamPermissions(resource,permissions);}
The set of permissions to check for the resource. Permissions with
wildcards (such as '*' or 'storage.*') are not allowed. For more information see
IAM Overview.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){TestIamPermissionsRequestrequest=TestIamPermissionsRequest.newBuilder().setResource(SourceName.ofOrganizationSourceName("[ORGANIZATION]","[SOURCE]").toString()).addAllPermissions(newArrayList()).build();ApiFuturefuture=securityCenterClient.testIamPermissionsCallable().futureCall(request);// Do something.TestIamPermissionsResponseresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){BigQueryExportbigQueryExport=BigQueryExport.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();BigQueryExportresponse=securityCenterClient.updateBigQueryExport(bigQueryExport,updateMask);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateBigQueryExportRequestrequest=UpdateBigQueryExportRequest.newBuilder().setBigQueryExport(BigQueryExport.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();BigQueryExportresponse=securityCenterClient.updateBigQueryExport(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateBigQueryExportRequestrequest=UpdateBigQueryExportRequest.newBuilder().setBigQueryExport(BigQueryExport.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateBigQueryExportCallable().futureCall(request);// Do something.BigQueryExportresponse=future.get();}
Updates external system. This is for a given finding. If no location is specified, finding is
assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ExternalSystemexternalSystem=ExternalSystem.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();ExternalSystemresponse=securityCenterClient.updateExternalSystem(externalSystem,updateMask);}
Updates external system. This is for a given finding. If no location is specified, finding is
assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateExternalSystemRequestrequest=UpdateExternalSystemRequest.newBuilder().setExternalSystem(ExternalSystem.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ExternalSystemresponse=securityCenterClient.updateExternalSystem(request);}
Updates external system. This is for a given finding. If no location is specified, finding is
assumed to be in global
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateExternalSystemRequestrequest=UpdateExternalSystemRequest.newBuilder().setExternalSystem(ExternalSystem.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateExternalSystemCallable().futureCall(request);// Do something.ExternalSystemresponse=future.get();}
Creates or updates a finding. If no location is specified, finding is assumed to be in global.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Findingfinding=Finding.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();Findingresponse=securityCenterClient.updateFinding(finding,updateMask);}
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.
The FieldMask to use when updating the finding resource. This field should
not be specified when creating a finding.
When updating a finding, an empty mask is treated as updating all mutable fields and
replacing source_properties. Individual source_properties can be added/updated by using
"source_properties." in the field mask.
Creates or updates a finding. If no location is specified, finding is assumed to be in global.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateFindingRequestrequest=UpdateFindingRequest.newBuilder().setFinding(Finding.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();Findingresponse=securityCenterClient.updateFinding(request);}
Creates or updates a finding. If no location is specified, finding is assumed to be in global.
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateFindingRequestrequest=UpdateFindingRequest.newBuilder().setFinding(Finding.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateFindingCallable().futureCall(request);// Do something.Findingresponse=future.get();}
Updates a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){MuteConfigmuteConfig=MuteConfig.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();MuteConfigresponse=securityCenterClient.updateMuteConfig(muteConfig,updateMask);}
Updates a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateMuteConfigRequestrequest=UpdateMuteConfigRequest.newBuilder().setMuteConfig(MuteConfig.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();MuteConfigresponse=securityCenterClient.updateMuteConfig(request);}
Updates a mute config. If no location is specified, default is global.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateMuteConfigRequestrequest=UpdateMuteConfigRequest.newBuilder().setMuteConfig(MuteConfig.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateMuteConfigCallable().futureCall(request);// Do something.MuteConfigresponse=future.get();}
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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){NotificationConfignotificationConfig=NotificationConfig.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();NotificationConfigresponse=securityCenterClient.updateNotificationConfig(notificationConfig,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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateNotificationConfigRequestrequest=UpdateNotificationConfigRequest.newBuilder().setNotificationConfig(NotificationConfig.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();NotificationConfigresponse=securityCenterClient.updateNotificationConfig(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_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateNotificationConfigRequestrequest=UpdateNotificationConfigRequest.newBuilder().setNotificationConfig(NotificationConfig.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateNotificationConfigCallable().futureCall(request);// Do something.NotificationConfigresponse=future.get();}
Updates an existing ResourceValueConfigs with new rules.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){ResourceValueConfigresourceValueConfig=ResourceValueConfig.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();ResourceValueConfigresponse=securityCenterClient.updateResourceValueConfig(resourceValueConfig,updateMask);}
The list of fields to be updated. If empty all mutable fields will be
updated.
To update nested fields, include the top level field in the mask For example, to update
gcp_metadata.resource_type, include the "gcp_metadata" field mask
Updates an existing ResourceValueConfigs with new rules.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateResourceValueConfigRequestrequest=UpdateResourceValueConfigRequest.newBuilder().setResourceValueConfig(ResourceValueConfig.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ResourceValueConfigresponse=securityCenterClient.updateResourceValueConfig(request);}
Updates an existing ResourceValueConfigs with new rules.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateResourceValueConfigRequestrequest=UpdateResourceValueConfigRequest.newBuilder().setResourceValueConfig(ResourceValueConfig.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateResourceValueConfigCallable().futureCall(request);// Do something.ResourceValueConfigresponse=future.get();}
Updates security marks. For Finding Security marks, if no location is specified, finding is
assumed to be in global. Assets Security Marks can only be accessed through global endpoint.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){SecurityMarkssecurityMarks=SecurityMarks.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();SecurityMarksresponse=securityCenterClient.updateSecurityMarks(securityMarks,updateMask);}
The FieldMask to use when updating the security marks resource.
The field mask must not contain duplicate fields. If empty or set to "marks", all marks
will be replaced. Individual marks can be updated using "marks.".
Updates security marks. For Finding Security marks, if no location is specified, finding is
assumed to be in global. Assets Security Marks can only be accessed through global endpoint.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateSecurityMarksRequestrequest=UpdateSecurityMarksRequest.newBuilder().setSecurityMarks(SecurityMarks.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();SecurityMarksresponse=securityCenterClient.updateSecurityMarks(request);}
Updates security marks. For Finding Security marks, if no location is specified, finding is
assumed to be in global. Assets Security Marks can only be accessed through global endpoint.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateSecurityMarksRequestrequest=UpdateSecurityMarksRequest.newBuilder().setSecurityMarks(SecurityMarks.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateSecurityMarksCallable().futureCall(request);// Do something.SecurityMarksresponse=future.get();}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){Sourcesource=Source.newBuilder().build();FieldMaskupdateMask=FieldMask.newBuilder().build();Sourceresponse=securityCenterClient.updateSource(source,updateMask);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateSourceRequestrequest=UpdateSourceRequest.newBuilder().setSource(Source.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();Sourceresponse=securityCenterClient.updateSource(request);}
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(SecurityCenterClientsecurityCenterClient=SecurityCenterClient.create()){UpdateSourceRequestrequest=UpdateSourceRequest.newBuilder().setSource(Source.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();ApiFuturefuture=securityCenterClient.updateSourceCallable().futureCall(request);// Do something.Sourceresponse=future.get();}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-06 UTC."],[],[]]