Class SecurityCenterClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
List<CreateResourceValueConfigRequest> requests = new ArrayList<>();
BatchCreateResourceValueConfigsResponse response =
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().
| 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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBigQueryExport |
Creates a BigQuery export. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFinding |
Creates a finding in a location. The corresponding source must exist for finding creation to succeed. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
CreateMuteConfig |
Creates a mute config. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateNotificationConfig |
Creates a notification config. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateSource |
Creates a source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBigQueryExport |
Deletes an existing BigQuery export. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMuteConfig |
Deletes an existing mute config. If no location is specified, default is global. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNotificationConfig |
Deletes a notification config. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteResourceValueConfig |
Deletes a ResourceValueConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBigQueryExport |
Gets a BigQuery export. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSimulation |
Get the simulation by name or the latest simulation for the given organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
GetValuedResource |
Get the valued resource by name |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
GetIamPolicy |
Gets the access control policy on the specified Source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
GetMuteConfig |
Gets a mute config. If no location is specified, default is global. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNotificationConfig |
Gets a notification config. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetResourceValueConfig |
Gets a ResourceValueConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSource |
Gets a source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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: + `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAttackPaths |
Lists the attack paths for a set of simulation results or valued resources and filter. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
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.
"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.
|
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: + `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMuteConfigs |
Lists mute configs. If no location is specified, default is global. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNotificationConfigs |
Lists notification configs. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListResourceValueConfigs |
Lists all ResourceValueConfigs. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSources |
Lists all sources belonging to an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
ListValuedResources |
Lists the valued resources for a set of simulation results and filter. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
SetFindingState |
Updates the state of a finding. If no location is specified, finding is assumed to be in global |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified Source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
SetMute |
Updates the mute state of a finding. If no location is specified, finding is assumed to be in global |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns the permissions that a caller has on the specified source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
UpdateBigQueryExport |
Updates a BigQuery export. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateExternalSystem |
Updates external system. This is for a given finding. If no location is specified, finding is assumed to be in global |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"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.
|
UpdateMuteConfig |
Updates a mute config. If no location is specified, default is global. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateNotificationConfig |
Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
UpdateResourceValueConfig |
Updates an existing ResourceValueConfigs with new rules. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"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.
|
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.
"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.
|
UpdateSource |
Updates a source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SecurityCenterSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SecurityCenterSettings securityCenterSettings =
SecurityCenterSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SecurityCenterSettings securityCenterSettings =
SecurityCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SecurityCenterSettings securityCenterSettings =
SecurityCenterSettings.newHttpJsonBuilder().build();
SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSecurityCenterClient(SecurityCenterSettings settings) Constructs an instance of SecurityCenterClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) Creates a ResourceValueConfig for an organization.batchCreateResourceValueConfigs(OrganizationLocationName parent, List<CreateResourceValueConfigRequest> requests) Creates a ResourceValueConfig for an organization.batchCreateResourceValueConfigs(OrganizationName parent, List<CreateResourceValueConfigRequest> requests) Creates a ResourceValueConfig for an organization.batchCreateResourceValueConfigs(String parent, List<CreateResourceValueConfigRequest> requests) Creates a ResourceValueConfig for an organization.Creates a ResourceValueConfig for an organization.final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(ResourceName parent) Kicks off an LRO to bulk mute findings for a parent based on a filter.final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> Kicks off an LRO to bulk mute findings for a parent based on a filter.final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(String parent) Kicks off an LRO to bulk mute findings for a parent based on a filter.Kicks off an LRO to bulk mute findings for a parent based on a filter.final OperationCallable<BulkMuteFindingsRequest,BulkMuteFindingsResponse, com.google.protobuf.Empty> Kicks off an LRO to bulk mute findings for a parent based on a filter.final voidclose()static final SecurityCenterClientcreate()Constructs an instance of SecurityCenterClient with default settings.static final SecurityCenterClientcreate(SecurityCenterSettings settings) Constructs an instance of SecurityCenterClient, using the given settings.static final SecurityCenterClientcreate(SecurityCenterStub stub) Constructs an instance of SecurityCenterClient, using the given stub for making calls.final BigQueryExportCreates a BigQuery export.final BigQueryExportcreateBigQueryExport(FolderLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.final BigQueryExportcreateBigQueryExport(LocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.final BigQueryExportcreateBigQueryExport(OrganizationLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.final BigQueryExportcreateBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.Creates a BigQuery export.final FindingcreateFinding(CreateFindingRequest request) Creates a finding in a location.final FindingcreateFinding(SourceName parent, Finding finding, String findingId) Creates a finding in a location.final FindingcreateFinding(String parent, Finding finding, String findingId) Creates a finding in a location.Creates a finding in a location.final MuteConfigcreateMuteConfig(CreateMuteConfigRequest request) Creates a mute config.final MuteConfigcreateMuteConfig(FolderLocationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.final MuteConfigcreateMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.final MuteConfigcreateMuteConfig(LocationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.final MuteConfigcreateMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.final MuteConfigcreateMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.final MuteConfigcreateMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.final MuteConfigcreateMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Creates a mute config.final NotificationConfigCreates a notification config.final NotificationConfigcreateNotificationConfig(FolderLocationName parent, NotificationConfig notificationConfig, String configId) Creates a notification config.final NotificationConfigcreateNotificationConfig(LocationName parent, NotificationConfig notificationConfig, String configId) Creates a notification config.final NotificationConfigcreateNotificationConfig(OrganizationLocationName parent, NotificationConfig notificationConfig, String configId) Creates a notification config.final NotificationConfigcreateNotificationConfig(String parent, NotificationConfig notificationConfig, String configId) Creates a notification config.Creates a notification config.final SourcecreateSource(CreateSourceRequest request) Creates a source.final SourcecreateSource(OrganizationName parent, Source source) Creates a source.final SourcecreateSource(String parent, Source source) Creates a source.Creates a source.final voidDeletes an existing BigQuery export.final voidDeletes an existing BigQuery export.final voiddeleteBigQueryExport(String name) Deletes an existing BigQuery export.final UnaryCallable<DeleteBigQueryExportRequest,com.google.protobuf.Empty> Deletes an existing BigQuery export.final voiddeleteMuteConfig(DeleteMuteConfigRequest request) Deletes an existing mute config.final voidDeletes an existing mute config.final voiddeleteMuteConfig(String name) Deletes an existing mute config.final UnaryCallable<DeleteMuteConfigRequest,com.google.protobuf.Empty> Deletes an existing mute config.final voidDeletes a notification config.final voidDeletes a notification config.final voidDeletes a notification config.final UnaryCallable<DeleteNotificationConfigRequest,com.google.protobuf.Empty> Deletes a notification config.final voidDeletes a ResourceValueConfig.final voidDeletes a ResourceValueConfig.final voidDeletes a ResourceValueConfig.final UnaryCallable<DeleteResourceValueConfigRequest,com.google.protobuf.Empty> Deletes a ResourceValueConfig.final BigQueryExportGets a BigQuery export.final BigQueryExportGets a BigQuery export.final BigQueryExportgetBigQueryExport(String name) Gets a BigQuery export.Gets a BigQuery export.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(ResourceName resource) Gets the access control policy on the specified Source.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy on the specified Source.final PolicygetIamPolicy(String resource) Gets the access control policy on the specified Source.Gets the access control policy on the specified Source.final MuteConfiggetMuteConfig(GetMuteConfigRequest request) Gets a mute config.final MuteConfiggetMuteConfig(MuteConfigName name) Gets a mute config.final MuteConfiggetMuteConfig(String name) Gets a mute config.Gets a mute config.final NotificationConfigGets a notification config.final NotificationConfigGets a notification config.final NotificationConfiggetNotificationConfig(String name) Gets a notification config.Gets a notification config.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ResourceValueConfigGets a ResourceValueConfig.final ResourceValueConfigGets a ResourceValueConfig.final ResourceValueConfiggetResourceValueConfig(String name) Gets a ResourceValueConfig.Gets a ResourceValueConfig.final SecurityCenterSettingsfinal SimulationgetSimulation(GetSimulationRequest request) Get the simulation by name or the latest simulation for the given organization.final SimulationgetSimulation(SimulationName name) Get the simulation by name or the latest simulation for the given organization.final SimulationgetSimulation(String name) Get the simulation by name or the latest simulation for the given organization.Get the simulation by name or the latest simulation for the given organization.final SourcegetSource(GetSourceRequest request) Gets a source.final SourcegetSource(SourceName name) Gets a source.final SourceGets a source.final UnaryCallable<GetSourceRequest,Source> Gets a source.getStub()final ValuedResourceGet the valued resource by namefinal ValuedResourceGet the valued resource by namefinal ValuedResourcegetValuedResource(String name) Get the valued resource by nameGet the valued resource by namegroupFindings(GroupFindingsRequest request) Filters an organization or source's findings and groups them by their specified properties in a location.groupFindings(SourceName parent, String groupBy) Filters an organization or source's findings and groups them by their specified properties in a location.groupFindings(String parent, String groupBy) Filters an organization or source's findings and groups them by their specified properties in a location.Filters an organization or source's findings and groups them by their specified properties in a location.Filters an organization or source's findings and groups them by their specified properties in a location.booleanbooleanlistAttackPaths(ListAttackPathsRequest request) Lists the attack paths for a set of simulation results or valued resources and filter.Lists the attack paths for a set of simulation results or valued resources and filter.listAttackPaths(ValuedResourceName parent) Lists the attack paths for a set of simulation results or valued resources and filter.listAttackPaths(String parent) Lists the attack paths for a set of simulation results or valued resources and filter.Lists the attack paths for a set of simulation results or valued resources and filter.Lists the attack paths for a set of simulation results or valued resources and filter.Lists BigQuery exports.Lists BigQuery exports.listBigQueryExports(LocationName parent) Lists BigQuery exports.Lists BigQuery exports.listBigQueryExports(String parent) Lists BigQuery exports.Lists BigQuery exports.final UnaryCallable<ListBigQueryExportsRequest,SecurityCenterClient.ListBigQueryExportsPagedResponse> Lists BigQuery exports.listFindings(ListFindingsRequest request) Lists an organization or source's findings.listFindings(SourceName parent) Lists an organization or source's findings.listFindings(String parent) Lists an organization or source's findings.Lists an organization or source's findings.Lists an organization or source's findings.listMuteConfigs(FolderLocationName parent) Lists mute configs.listMuteConfigs(FolderName parent) Lists mute configs.listMuteConfigs(ListMuteConfigsRequest request) Lists mute configs.listMuteConfigs(LocationName parent) Lists mute configs.Lists mute configs.listMuteConfigs(OrganizationName parent) Lists mute configs.listMuteConfigs(ProjectName parent) Lists mute configs.listMuteConfigs(String parent) Lists mute configs.Lists mute configs.Lists mute configs.Lists notification configs.Lists notification configs.listNotificationConfigs(LocationName parent) Lists notification configs.Lists notification configs.listNotificationConfigs(String parent) Lists notification configs.Lists notification configs.final UnaryCallable<ListNotificationConfigsRequest,SecurityCenterClient.ListNotificationConfigsPagedResponse> Lists notification configs.Lists all ResourceValueConfigs.Lists all ResourceValueConfigs.Lists all ResourceValueConfigs.listResourceValueConfigs(String parent) Lists all ResourceValueConfigs.Lists all ResourceValueConfigs.final UnaryCallable<ListResourceValueConfigsRequest,SecurityCenterClient.ListResourceValueConfigsPagedResponse> Lists all ResourceValueConfigs.listSources(FolderName parent) Lists all sources belonging to an organization.listSources(ListSourcesRequest request) Lists all sources belonging to an organization.listSources(OrganizationName parent) Lists all sources belonging to an organization.listSources(ProjectName parent) Lists all sources belonging to an organization.listSources(String parent) Lists all sources belonging to an organization.Lists all sources belonging to an organization.Lists all sources belonging to an organization.Lists the valued resources for a set of simulation results and filter.listValuedResources(SimulationName parent) Lists the valued resources for a set of simulation results and filter.listValuedResources(String parent) Lists the valued resources for a set of simulation results and filter.Lists the valued resources for a set of simulation results and filter.final UnaryCallable<ListValuedResourcesRequest,SecurityCenterClient.ListValuedResourcesPagedResponse> Lists the valued resources for a set of simulation results and filter.final FindingsetFindingState(FindingName name, Finding.State state) Updates the state of a finding.final FindingsetFindingState(SetFindingStateRequest request) Updates the state of a finding.final FindingsetFindingState(String name, Finding.State state) Updates the state of a finding.Updates the state of a finding.final PolicysetIamPolicy(ResourceName resource, Policy policy) Sets the access control policy on the specified Source.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified Source.final PolicysetIamPolicy(String resource, Policy policy) Sets the access control policy on the specified Source.Sets the access control policy on the specified Source.final FindingsetMute(FindingName name, Finding.Mute mute) Updates the mute state of a finding.final FindingsetMute(SetMuteRequest request) Updates the mute state of a finding.final FindingsetMute(String name, Finding.Mute mute) Updates the mute state of a finding.final UnaryCallable<SetMuteRequest,Finding> Updates the mute state of a finding.voidshutdown()voidtestIamPermissions(ResourceName resource, List<String> permissions) Returns the permissions that a caller has on the specified source.Returns the permissions that a caller has on the specified source.testIamPermissions(String resource, List<String> permissions) Returns the permissions that a caller has on the specified source.Returns the permissions that a caller has on the specified source.final BigQueryExportupdateBigQueryExport(BigQueryExport bigQueryExport, com.google.protobuf.FieldMask updateMask) Updates a BigQuery export.final BigQueryExportUpdates a BigQuery export.Updates a BigQuery export.final ExternalSystemupdateExternalSystem(ExternalSystem externalSystem, com.google.protobuf.FieldMask updateMask) Updates external system.final ExternalSystemUpdates external system.Updates external system.final FindingupdateFinding(Finding finding, com.google.protobuf.FieldMask updateMask) Creates or updates a finding.final FindingupdateFinding(UpdateFindingRequest request) Creates or updates a finding.Creates or updates a finding.final MuteConfigupdateMuteConfig(MuteConfig muteConfig, com.google.protobuf.FieldMask updateMask) Updates a mute config.final MuteConfigupdateMuteConfig(UpdateMuteConfigRequest request) Updates a mute config.Updates a mute config.final NotificationConfigupdateNotificationConfig(NotificationConfig notificationConfig, com.google.protobuf.FieldMask updateMask) Updates a notification config.final NotificationConfigUpdates a notification config.Updates a notification config.final ResourceValueConfigupdateResourceValueConfig(ResourceValueConfig resourceValueConfig, com.google.protobuf.FieldMask updateMask) Updates an existing ResourceValueConfigs with new rules.final ResourceValueConfigUpdates an existing ResourceValueConfigs with new rules.Updates an existing ResourceValueConfigs with new rules.final SecurityMarksupdateSecurityMarks(SecurityMarks securityMarks, com.google.protobuf.FieldMask updateMask) Updates security marks.final SecurityMarksUpdates security marks.Updates security marks.final SourceupdateSource(Source source, com.google.protobuf.FieldMask updateMask) Updates a source.final SourceupdateSource(UpdateSourceRequest request) Updates a source.Updates a source.
-
Constructor Details
-
SecurityCenterClient
Constructs an instance of SecurityCenterClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
SecurityCenterClient
-
-
Method Details
-
create
Constructs an instance of SecurityCenterClient with default settings.- Throws:
IOException
-
create
Constructs an instance of SecurityCenterClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of SecurityCenterClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecurityCenterSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
batchCreateResourceValueConfigs
public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(OrganizationLocationName parent, List<CreateResourceValueConfigRequest> requests) Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); List<CreateResourceValueConfigRequest> requests = new ArrayList<>(); BatchCreateResourceValueConfigsResponse response = securityCenterClient.batchCreateResourceValueConfigs(parent, requests); }- Parameters:
parent- Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field.requests- Required. The resource value configs to be created.- Throws:
ApiException- if the remote call fails
-
batchCreateResourceValueConfigs
public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(OrganizationName parent, List<CreateResourceValueConfigRequest> requests) Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); List<CreateResourceValueConfigRequest> requests = new ArrayList<>(); BatchCreateResourceValueConfigsResponse response = securityCenterClient.batchCreateResourceValueConfigs(parent, requests); }- Parameters:
parent- Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field.requests- Required. The resource value configs to be created.- Throws:
ApiException- if the remote call fails
-
batchCreateResourceValueConfigs
public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(String parent, List<CreateResourceValueConfigRequest> requests) Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationName.of("[ORGANIZATION]").toString(); List<CreateResourceValueConfigRequest> requests = new ArrayList<>(); BatchCreateResourceValueConfigsResponse response = securityCenterClient.batchCreateResourceValueConfigs(parent, requests); }- Parameters:
parent- Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field.requests- Required. The resource value configs to be created.- Throws:
ApiException- if the remote call fails
-
batchCreateResourceValueConfigs
public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(BatchCreateResourceValueConfigsRequest request) Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BatchCreateResourceValueConfigsRequest request = BatchCreateResourceValueConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .addAllRequests(new ArrayList<CreateResourceValueConfigRequest>()) .build(); BatchCreateResourceValueConfigsResponse response = securityCenterClient.batchCreateResourceValueConfigs(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
batchCreateResourceValueConfigsCallable
public final UnaryCallable<BatchCreateResourceValueConfigsRequest,BatchCreateResourceValueConfigsResponse> batchCreateResourceValueConfigsCallable()Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BatchCreateResourceValueConfigsRequest request = BatchCreateResourceValueConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .addAllRequests(new ArrayList<CreateResourceValueConfigRequest>()) .build(); ApiFuture<BatchCreateResourceValueConfigsResponse> future = securityCenterClient.batchCreateResourceValueConfigsCallable().futureCall(request); // Do something. BatchCreateResourceValueConfigsResponse response = future.get(); } -
bulkMuteFindingsAsync
public final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(ResourceName parent) Kicks off an LRO to bulk mute findings for a parent based on a filter. 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceName parent = FolderName.of("[FOLDER]"); BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get(); }- Parameters:
parent- Required. The parent, at which bulk action needs to be applied. If no location is specified, findings are updated in global. The following list shows some examples:+ `organizations/[organization_id]` + `organizations/[organization_id]/locations/[location_id]` + `folders/[folder_id]` + `folders/[folder_id]/locations/[location_id]` + `projects/[project_id]` + `projects/[project_id]/locations/[location_id]`
- Throws:
ApiException- if the remote call fails
-
bulkMuteFindingsAsync
public final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(String parent) Kicks off an LRO to bulk mute findings for a parent based on a filter. 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = FolderName.of("[FOLDER]").toString(); BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get(); }- Parameters:
parent- Required. The parent, at which bulk action needs to be applied. If no location is specified, findings are updated in global. The following list shows some examples:+ `organizations/[organization_id]` + `organizations/[organization_id]/locations/[location_id]` + `folders/[folder_id]` + `folders/[folder_id]/locations/[location_id]` + `projects/[project_id]` + `projects/[project_id]/locations/[location_id]`
- Throws:
ApiException- if the remote call fails
-
bulkMuteFindingsAsync
public final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(BulkMuteFindingsRequest request) Kicks off an LRO to bulk mute findings for a parent based on a filter. 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BulkMuteFindingsRequest request = BulkMuteFindingsRequest.newBuilder() .setParent(FolderName.of("[FOLDER]").toString()) .setFilter("filter-1274492040") .build(); BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
bulkMuteFindingsOperationCallable
public final OperationCallable<BulkMuteFindingsRequest,BulkMuteFindingsResponse, bulkMuteFindingsOperationCallable()com.google.protobuf.Empty> 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BulkMuteFindingsRequest request = BulkMuteFindingsRequest.newBuilder() .setParent(FolderName.of("[FOLDER]").toString()) .setFilter("filter-1274492040") .build(); OperationFuture<BulkMuteFindingsResponse, Empty> future = securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request); // Do something. BulkMuteFindingsResponse response = future.get(); } -
bulkMuteFindingsCallable
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BulkMuteFindingsRequest request = BulkMuteFindingsRequest.newBuilder() .setParent(FolderName.of("[FOLDER]").toString()) .setFilter("filter-1274492040") .build(); ApiFuture<Operation> future = securityCenterClient.bulkMuteFindingsCallable().futureCall(request); // Do something. Operation response = future.get(); } -
createBigQueryExport
public final BigQueryExport createBigQueryExport(FolderLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); String bigQueryExportId = "bigQueryExportId1024198583"; BigQueryExport response = securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); }- Parameters:
parent- Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.bigQueryExport- Required. The BigQuery export being created.bigQueryExportId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createBigQueryExport
public final BigQueryExport createBigQueryExport(LocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); String bigQueryExportId = "bigQueryExportId1024198583"; BigQueryExport response = securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); }- Parameters:
parent- Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.bigQueryExport- Required. The BigQuery export being created.bigQueryExportId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createBigQueryExport
public final BigQueryExport createBigQueryExport(OrganizationLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); String bigQueryExportId = "bigQueryExportId1024198583"; BigQueryExport response = securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); }- Parameters:
parent- Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.bigQueryExport- Required. The BigQuery export being created.bigQueryExportId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createBigQueryExport
public final BigQueryExport createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId) Creates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); String bigQueryExportId = "bigQueryExportId1024198583"; BigQueryExport response = securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); }- Parameters:
parent- Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.bigQueryExport- Required. The BigQuery export being created.bigQueryExportId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createBigQueryExport
Creates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateBigQueryExportRequest request = CreateBigQueryExportRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setBigQueryExport(BigQueryExport.newBuilder().build()) .setBigQueryExportId("bigQueryExportId1024198583") .build(); BigQueryExport response = securityCenterClient.createBigQueryExport(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBigQueryExportCallable
public final UnaryCallable<CreateBigQueryExportRequest,BigQueryExport> createBigQueryExportCallable()Creates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateBigQueryExportRequest request = CreateBigQueryExportRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setBigQueryExport(BigQueryExport.newBuilder().build()) .setBigQueryExportId("bigQueryExportId1024198583") .build(); ApiFuture<BigQueryExport> future = securityCenterClient.createBigQueryExportCallable().futureCall(request); // Do something. BigQueryExport response = future.get(); } -
createFinding
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Finding finding = Finding.newBuilder().build(); String findingId = "findingId439150212"; Finding response = securityCenterClient.createFinding(parent, finding, findingId); }- Parameters:
parent- 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]`finding- Required. The Finding being created. The name and security_marks will be ignored as they are both output only fields on this resource.findingId- Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.- Throws:
ApiException- if the remote call fails
-
createFinding
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString(); Finding finding = Finding.newBuilder().build(); String findingId = "findingId439150212"; Finding response = securityCenterClient.createFinding(parent, finding, findingId); }- Parameters:
parent- 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]`finding- Required. The Finding being created. The name and security_marks will be ignored as they are both output only fields on this resource.findingId- Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.- Throws:
ApiException- if the remote call fails
-
createFinding
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateFindingRequest request = CreateFindingRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFindingId("findingId439150212") .setFinding(Finding.newBuilder().build()) .build(); Finding response = securityCenterClient.createFinding(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFindingCallable
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateFindingRequest request = CreateFindingRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFindingId("findingId439150212") .setFinding(Finding.newBuilder().build()) .build(); ApiFuture<Finding> future = securityCenterClient.createFindingCallable().futureCall(request); // Do something. Finding response = future.get(); } -
createMuteConfig
public final MuteConfig createMuteConfig(FolderLocationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderName parent = FolderName.of("[FOLDER]"); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
public final MuteConfig createMuteConfig(LocationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
public final MuteConfig createMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId) Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationName.of("[ORGANIZATION]").toString(); MuteConfig muteConfig = MuteConfig.newBuilder().build(); String muteConfigId = "muteConfigId1689669942"; MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId); }- Parameters:
parent- Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.muteConfig- Required. The mute config being created.muteConfigId- Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.- Throws:
ApiException- if the remote call fails
-
createMuteConfig
Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateMuteConfigRequest request = CreateMuteConfigRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setMuteConfig(MuteConfig.newBuilder().build()) .setMuteConfigId("muteConfigId1689669942") .build(); MuteConfig response = securityCenterClient.createMuteConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMuteConfigCallable
Creates a mute config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateMuteConfigRequest request = CreateMuteConfigRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setMuteConfig(MuteConfig.newBuilder().build()) .setMuteConfigId("muteConfigId1689669942") .build(); ApiFuture<MuteConfig> future = securityCenterClient.createMuteConfigCallable().futureCall(request); // Do something. MuteConfig response = future.get(); } -
createNotificationConfig
public final NotificationConfig createNotificationConfig(FolderLocationName parent, NotificationConfig notificationConfig, String configId) Creates a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); String configId = "configId-580140035"; NotificationConfig response = securityCenterClient.createNotificationConfig(parent, notificationConfig, configId); }- Parameters:
parent- 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]`.notificationConfig- Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.configId- Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.- Throws:
ApiException- if the remote call fails
-
createNotificationConfig
public final NotificationConfig createNotificationConfig(LocationName parent, NotificationConfig notificationConfig, String configId) Creates a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); String configId = "configId-580140035"; NotificationConfig response = securityCenterClient.createNotificationConfig(parent, notificationConfig, configId); }- Parameters:
parent- 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]`.notificationConfig- Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.configId- Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.- Throws:
ApiException- if the remote call fails
-
createNotificationConfig
public final NotificationConfig createNotificationConfig(OrganizationLocationName parent, NotificationConfig notificationConfig, String configId) Creates a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); String configId = "configId-580140035"; NotificationConfig response = securityCenterClient.createNotificationConfig(parent, notificationConfig, configId); }- Parameters:
parent- 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]`.notificationConfig- Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.configId- Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.- Throws:
ApiException- if the remote call fails
-
createNotificationConfig
public final NotificationConfig createNotificationConfig(String parent, NotificationConfig notificationConfig, String configId) Creates a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); String configId = "configId-580140035"; NotificationConfig response = securityCenterClient.createNotificationConfig(parent, notificationConfig, configId); }- Parameters:
parent- 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]`.notificationConfig- Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.configId- Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.- Throws:
ApiException- if the remote call fails
-
createNotificationConfig
Creates a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateNotificationConfigRequest request = CreateNotificationConfigRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setConfigId("configId-580140035") .setNotificationConfig(NotificationConfig.newBuilder().build()) .build(); NotificationConfig response = securityCenterClient.createNotificationConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createNotificationConfigCallable
public final UnaryCallable<CreateNotificationConfigRequest,NotificationConfig> createNotificationConfigCallable()Creates a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateNotificationConfigRequest request = CreateNotificationConfigRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setConfigId("configId-580140035") .setNotificationConfig(NotificationConfig.newBuilder().build()) .build(); ApiFuture<NotificationConfig> future = securityCenterClient.createNotificationConfigCallable().futureCall(request); // Do something. NotificationConfig response = future.get(); } -
createSource
Creates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); Source source = Source.newBuilder().build(); Source response = securityCenterClient.createSource(parent, source); }- Parameters:
parent- Required. Resource name of the new source's parent. Its format should be `organizations/[organization_id]`.source- Required. The Source being created, only the display_name and description will be used. All other fields will be ignored.- Throws:
ApiException- if the remote call fails
-
createSource
Creates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationName.of("[ORGANIZATION]").toString(); Source source = Source.newBuilder().build(); Source response = securityCenterClient.createSource(parent, source); }- Parameters:
parent- Required. Resource name of the new source's parent. Its format should be `organizations/[organization_id]`.source- Required. The Source being created, only the display_name and description will be used. All other fields will be ignored.- Throws:
ApiException- if the remote call fails
-
createSource
Creates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setSource(Source.newBuilder().build()) .build(); Source response = securityCenterClient.createSource(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createSourceCallable
Creates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setSource(Source.newBuilder().build()) .build(); ApiFuture<Source> future = securityCenterClient.createSourceCallable().futureCall(request); // Do something. Source response = future.get(); } -
deleteBigQueryExport
Deletes an existing BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BigQueryExportName name = BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); securityCenterClient.deleteBigQueryExport(name); }- Parameters:
name- Required. The name of the BigQuery export to delete. The following list shows some examples of the format:+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
- Throws:
ApiException- if the remote call fails
-
deleteBigQueryExport
Deletes an existing BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") .toString(); securityCenterClient.deleteBigQueryExport(name); }- Parameters:
name- Required. The name of the BigQuery export to delete. The following list shows some examples of the format:+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
- Throws:
ApiException- if the remote call fails
-
deleteBigQueryExport
Deletes an existing BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteBigQueryExportRequest request = DeleteBigQueryExportRequest.newBuilder() .setName( BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") .toString()) .build(); securityCenterClient.deleteBigQueryExport(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBigQueryExportCallable
public final UnaryCallable<DeleteBigQueryExportRequest,com.google.protobuf.Empty> deleteBigQueryExportCallable()Deletes an existing BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteBigQueryExportRequest request = DeleteBigQueryExportRequest.newBuilder() .setName( BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") .toString()) .build(); ApiFuture<Empty> future = securityCenterClient.deleteBigQueryExportCallable().futureCall(request); // Do something. future.get(); } -
deleteMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { MuteConfigName name = MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); securityCenterClient.deleteMuteConfig(name); }- Parameters:
name- Required. Name of the mute config to delete. The following list shows some examples of the format:+ `organizations/{organization}/muteConfigs/{config_id}` + `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + `folders/{folder}/muteConfigs/{config_id}` + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + `projects/{project}/muteConfigs/{config_id}` + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
- Throws:
ApiException- if the remote call fails
-
deleteMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString(); securityCenterClient.deleteMuteConfig(name); }- Parameters:
name- Required. Name of the mute config to delete. The following list shows some examples of the format:+ `organizations/{organization}/muteConfigs/{config_id}` + `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + `folders/{folder}/muteConfigs/{config_id}` + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + `projects/{project}/muteConfigs/{config_id}` + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
- Throws:
ApiException- if the remote call fails
-
deleteMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteMuteConfigRequest request = DeleteMuteConfigRequest.newBuilder() .setName( MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") .toString()) .build(); securityCenterClient.deleteMuteConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMuteConfigCallable
public final UnaryCallable<DeleteMuteConfigRequest,com.google.protobuf.Empty> deleteMuteConfigCallable()Deletes an existing mute config. 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteMuteConfigRequest request = DeleteMuteConfigRequest.newBuilder() .setName( MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") .toString()) .build(); ApiFuture<Empty> future = securityCenterClient.deleteMuteConfigCallable().futureCall(request); // Do something. future.get(); } -
deleteNotificationConfig
Deletes a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { NotificationConfigName name = NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); securityCenterClient.deleteNotificationConfig(name); }- Parameters:
name- Required. Name of the notification config to delete. The following list shows some examples of the format:+ `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]`
- Throws:
ApiException- if the remote call fails
-
deleteNotificationConfig
Deletes a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") .toString(); securityCenterClient.deleteNotificationConfig(name); }- Parameters:
name- Required. Name of the notification config to delete. The following list shows some examples of the format:+ `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]`
- Throws:
ApiException- if the remote call fails
-
deleteNotificationConfig
Deletes a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteNotificationConfigRequest request = DeleteNotificationConfigRequest.newBuilder() .setName( NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") .toString()) .build(); securityCenterClient.deleteNotificationConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteNotificationConfigCallable
public final UnaryCallable<DeleteNotificationConfigRequest,com.google.protobuf.Empty> deleteNotificationConfigCallable()Deletes a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteNotificationConfigRequest request = DeleteNotificationConfigRequest.newBuilder() .setName( NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") .toString()) .build(); ApiFuture<Empty> future = securityCenterClient.deleteNotificationConfigCallable().futureCall(request); // Do something. future.get(); } -
deleteResourceValueConfig
Deletes a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceValueConfigName name = ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); securityCenterClient.deleteResourceValueConfig(name); }- Parameters:
name- Required. Name of the ResourceValueConfig to delete- Throws:
ApiException- if the remote call fails
-
deleteResourceValueConfig
Deletes a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") .toString(); securityCenterClient.deleteResourceValueConfig(name); }- Parameters:
name- Required. Name of the ResourceValueConfig to delete- Throws:
ApiException- if the remote call fails
-
deleteResourceValueConfig
Deletes a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteResourceValueConfigRequest request = DeleteResourceValueConfigRequest.newBuilder() .setName( ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") .toString()) .build(); securityCenterClient.deleteResourceValueConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteResourceValueConfigCallable
public final UnaryCallable<DeleteResourceValueConfigRequest,com.google.protobuf.Empty> deleteResourceValueConfigCallable()Deletes a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { DeleteResourceValueConfigRequest request = DeleteResourceValueConfigRequest.newBuilder() .setName( ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") .toString()) .build(); ApiFuture<Empty> future = securityCenterClient.deleteResourceValueConfigCallable().futureCall(request); // Do something. future.get(); } -
getBigQueryExport
Gets a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BigQueryExportName name = BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); BigQueryExport response = securityCenterClient.getBigQueryExport(name); }- Parameters:
name- Required. Name of the BigQuery export to retrieve. The following list shows some examples of the format:+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
- Throws:
ApiException- if the remote call fails
-
getBigQueryExport
Gets a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") .toString(); BigQueryExport response = securityCenterClient.getBigQueryExport(name); }- Parameters:
name- Required. Name of the BigQuery export to retrieve. The following list shows some examples of the format:+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
- Throws:
ApiException- if the remote call fails
-
getBigQueryExport
Gets a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetBigQueryExportRequest request = GetBigQueryExportRequest.newBuilder() .setName( BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") .toString()) .build(); BigQueryExport response = securityCenterClient.getBigQueryExport(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBigQueryExportCallable
Gets a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetBigQueryExportRequest request = GetBigQueryExportRequest.newBuilder() .setName( BigQueryExportName.ofOrganizationLocationExportName( "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") .toString()) .build(); ApiFuture<BigQueryExport> future = securityCenterClient.getBigQueryExportCallable().futureCall(request); // Do something. BigQueryExport response = future.get(); } -
getSimulation
Get the simulation by name or the latest simulation for the given organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SimulationName name = SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]"); Simulation response = securityCenterClient.getSimulation(name); }- Parameters:
name- Required. The organization name or simulation name of this simulationValid format: `organizations/{organization}/simulations/latest` `organizations/{organization}/simulations/{simulation}`
- Throws:
ApiException- if the remote call fails
-
getSimulation
Get the simulation by name or the latest simulation for the given organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]").toString(); Simulation response = securityCenterClient.getSimulation(name); }- Parameters:
name- Required. The organization name or simulation name of this simulationValid format: `organizations/{organization}/simulations/latest` `organizations/{organization}/simulations/{simulation}`
- Throws:
ApiException- if the remote call fails
-
getSimulation
Get the simulation by name or the latest simulation for the given organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetSimulationRequest request = GetSimulationRequest.newBuilder() .setName( SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]") .toString()) .build(); Simulation response = securityCenterClient.getSimulation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSimulationCallable
Get the simulation by name or the latest simulation for the given organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetSimulationRequest request = GetSimulationRequest.newBuilder() .setName( SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]") .toString()) .build(); ApiFuture<Simulation> future = securityCenterClient.getSimulationCallable().futureCall(request); // Do something. Simulation response = future.get(); } -
getValuedResource
Get the valued resource by nameSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ValuedResourceName name = ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); ValuedResource response = securityCenterClient.getValuedResource(name); }- Parameters:
name- Required. The name of this valued resourceValid format: `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
- Throws:
ApiException- if the remote call fails
-
getValuedResource
Get the valued resource by nameSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString(); ValuedResource response = securityCenterClient.getValuedResource(name); }- Parameters:
name- Required. The name of this valued resourceValid format: `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
- Throws:
ApiException- if the remote call fails
-
getValuedResource
Get the valued resource by nameSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetValuedResourceRequest request = GetValuedResourceRequest.newBuilder() .setName( ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString()) .build(); ValuedResource response = securityCenterClient.getValuedResource(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getValuedResourceCallable
Get the valued resource by nameSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetValuedResourceRequest request = GetValuedResourceRequest.newBuilder() .setName( ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString()) .build(); ApiFuture<ValuedResource> future = securityCenterClient.getValuedResourceCallable().futureCall(request); // Do something. ValuedResource response = future.get(); } -
getIamPolicy
Gets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy response = securityCenterClient.getIamPolicy(resource); }- Parameters:
resource- REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.- Throws:
ApiException- if the remote call fails
-
getIamPolicy
Gets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String resource = FolderName.of("[FOLDER]").toString(); Policy response = securityCenterClient.getIamPolicy(resource); }- Parameters:
resource- REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.- Throws:
ApiException- if the remote call fails
-
getIamPolicy
Gets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = securityCenterClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = securityCenterClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { MuteConfigName name = MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); MuteConfig response = securityCenterClient.getMuteConfig(name); }- Parameters:
name- Required. Name of the mute config to retrieve. The following list shows some examples of the format:+ `organizations/{organization}/muteConfigs/{config_id}` + `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + `folders/{folder}/muteConfigs/{config_id}` + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + `projects/{project}/muteConfigs/{config_id}` + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
- Throws:
ApiException- if the remote call fails
-
getMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString(); MuteConfig response = securityCenterClient.getMuteConfig(name); }- Parameters:
name- Required. Name of the mute config to retrieve. The following list shows some examples of the format:+ `organizations/{organization}/muteConfigs/{config_id}` + `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + `folders/{folder}/muteConfigs/{config_id}` + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + `projects/{project}/muteConfigs/{config_id}` + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
- Throws:
ApiException- if the remote call fails
-
getMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetMuteConfigRequest request = GetMuteConfigRequest.newBuilder() .setName( MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") .toString()) .build(); MuteConfig response = securityCenterClient.getMuteConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMuteConfigCallable
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetMuteConfigRequest request = GetMuteConfigRequest.newBuilder() .setName( MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") .toString()) .build(); ApiFuture<MuteConfig> future = securityCenterClient.getMuteConfigCallable().futureCall(request); // Do something. MuteConfig response = future.get(); } -
getNotificationConfig
Gets a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { NotificationConfigName name = NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); NotificationConfig response = securityCenterClient.getNotificationConfig(name); }- Parameters:
name- Required. Name of the notification config to get. The following list shows some examples of the format:+ `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]`
- Throws:
ApiException- if the remote call fails
-
getNotificationConfig
Gets a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") .toString(); NotificationConfig response = securityCenterClient.getNotificationConfig(name); }- Parameters:
name- Required. Name of the notification config to get. The following list shows some examples of the format:+ `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]`
- Throws:
ApiException- if the remote call fails
-
getNotificationConfig
Gets a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetNotificationConfigRequest request = GetNotificationConfigRequest.newBuilder() .setName( NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") .toString()) .build(); NotificationConfig response = securityCenterClient.getNotificationConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getNotificationConfigCallable
public final UnaryCallable<GetNotificationConfigRequest,NotificationConfig> getNotificationConfigCallable()Gets a notification config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetNotificationConfigRequest request = GetNotificationConfigRequest.newBuilder() .setName( NotificationConfigName.ofOrganizationLocationNotificationConfigName( "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") .toString()) .build(); ApiFuture<NotificationConfig> future = securityCenterClient.getNotificationConfigCallable().futureCall(request); // Do something. NotificationConfig response = future.get(); } -
getResourceValueConfig
Gets a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceValueConfigName name = ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); ResourceValueConfig response = securityCenterClient.getResourceValueConfig(name); }- Parameters:
name- Required. Name of the resource value config to retrieve. Its format is organizations/{organization}/resourceValueConfigs/{config_id}.- Throws:
ApiException- if the remote call fails
-
getResourceValueConfig
Gets a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") .toString(); ResourceValueConfig response = securityCenterClient.getResourceValueConfig(name); }- Parameters:
name- Required. Name of the resource value config to retrieve. Its format is organizations/{organization}/resourceValueConfigs/{config_id}.- Throws:
ApiException- if the remote call fails
-
getResourceValueConfig
Gets a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetResourceValueConfigRequest request = GetResourceValueConfigRequest.newBuilder() .setName( ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") .toString()) .build(); ResourceValueConfig response = securityCenterClient.getResourceValueConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getResourceValueConfigCallable
public final UnaryCallable<GetResourceValueConfigRequest,ResourceValueConfig> getResourceValueConfigCallable()Gets a ResourceValueConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetResourceValueConfigRequest request = GetResourceValueConfigRequest.newBuilder() .setName( ResourceValueConfigName.ofOrganizationResourceValueConfigName( "[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") .toString()) .build(); ApiFuture<ResourceValueConfig> future = securityCenterClient.getResourceValueConfigCallable().futureCall(request); // Do something. ResourceValueConfig response = future.get(); } -
getSource
Gets a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Source response = securityCenterClient.getSource(name); }- Parameters:
name- Required. Relative resource name of the source. Its format is `organizations/[organization_id]/source/[source_id]`.- Throws:
ApiException- if the remote call fails
-
getSource
Gets a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString(); Source response = securityCenterClient.getSource(name); }- Parameters:
name- Required. Relative resource name of the source. Its format is `organizations/[organization_id]/source/[source_id]`.- Throws:
ApiException- if the remote call fails
-
getSource
Gets a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetSourceRequest request = GetSourceRequest.newBuilder() .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .build(); Source response = securityCenterClient.getSource(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSourceCallable
Gets a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GetSourceRequest request = GetSourceRequest.newBuilder() .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .build(); ApiFuture<Source> future = securityCenterClient.getSourceCallable().futureCall(request); // Do something. Source response = future.get(); } -
groupFindings
public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(SourceName parent, String groupBy) 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 globalTo group across all sources provide a `-` as the source id. The following list shows some examples:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); String groupBy = "groupBy293428022"; for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of the source to groupBy. If no location is specified, finding is assumed to be in global. The following list shows some examples:+ `organizations/[organization_id]/sources/[source_id]` + `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + `folders/[folder_id]/sources/[source_id]` + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + `projects/[project_id]/sources/[source_id]` + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
To groupBy across all sources provide a source_id of `-`. The following list shows some examples:
+ `organizations/{organization_id}/sources/-` + `organizations/{organization_id}/sources/-/locations/[location_id]` + `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-/locations/[location_id]` + `projects/{project_id}/sources/-` + `projects/{project_id}/sources/-/locations/[location_id]`
groupBy- 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".- Throws:
ApiException- if the remote call fails
-
groupFindings
public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(String parent, String groupBy) Filters an organization or source's findings and groups them by their specified properties in a location. If no location is specified, findings are assumed to be in globalTo group across all sources provide a `-` as the source id. The following list shows some examples:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString(); String groupBy = "groupBy293428022"; for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of the source to groupBy. If no location is specified, finding is assumed to be in global. The following list shows some examples:+ `organizations/[organization_id]/sources/[source_id]` + `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + `folders/[folder_id]/sources/[source_id]` + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + `projects/[project_id]/sources/[source_id]` + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
To groupBy across all sources provide a source_id of `-`. The following list shows some examples:
+ `organizations/{organization_id}/sources/-` + `organizations/{organization_id}/sources/-/locations/[location_id]` + `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-/locations/[location_id]` + `projects/{project_id}/sources/-` + `projects/{project_id}/sources/-/locations/[location_id]`
groupBy- 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".- Throws:
ApiException- if the remote call fails
-
groupFindings
public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(GroupFindingsRequest request) 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 globalTo group across all sources provide a `-` as the source id. The following list shows some examples:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GroupFindingsRequest request = GroupFindingsRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFilter("filter-1274492040") .setGroupBy("groupBy293428022") .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); for (GroupResult element : securityCenterClient.groupFindings(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
groupFindingsPagedCallable
public final UnaryCallable<GroupFindingsRequest,SecurityCenterClient.GroupFindingsPagedResponse> groupFindingsPagedCallable()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 globalTo group across all sources provide a `-` as the source id. The following list shows some examples:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GroupFindingsRequest request = GroupFindingsRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFilter("filter-1274492040") .setGroupBy("groupBy293428022") .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); ApiFuture<GroupResult> future = securityCenterClient.groupFindingsPagedCallable().futureCall(request); // Do something. for (GroupResult element : future.get().iterateAll()) { // doThingsWith(element); } } -
groupFindingsCallable
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 globalTo group across all sources provide a `-` as the source id. The following list shows some examples:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { GroupFindingsRequest request = GroupFindingsRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFilter("filter-1274492040") .setGroupBy("groupBy293428022") .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); while (true) { GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request); for (GroupResult element : response.getGroupByResultsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listAttackPaths
public final SecurityCenterClient.ListAttackPathsPagedResponse listAttackPaths(OrganizationValuedResourceName parent) Lists the attack paths for a set of simulation results or valued resources and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationValuedResourceName parent = OrganizationValuedResourceName.of( "[ORGANIZATION]", "[LOCATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of parent to list attack paths.Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
- Throws:
ApiException- if the remote call fails
-
listAttackPaths
public final SecurityCenterClient.ListAttackPathsPagedResponse listAttackPaths(ValuedResourceName parent) Lists the attack paths for a set of simulation results or valued resources and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ValuedResourceName parent = ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of parent to list attack paths.Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
- Throws:
ApiException- if the remote call fails
-
listAttackPaths
Lists the attack paths for a set of simulation results or valued resources and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString(); for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of parent to list attack paths.Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
- Throws:
ApiException- if the remote call fails
-
listAttackPaths
public final SecurityCenterClient.ListAttackPathsPagedResponse listAttackPaths(ListAttackPathsRequest request) Lists the attack paths for a set of simulation results or valued resources and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListAttackPathsRequest request = ListAttackPathsRequest.newBuilder() .setParent( ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString()) .setFilter("filter-1274492040") .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); for (AttackPath element : securityCenterClient.listAttackPaths(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listAttackPathsPagedCallable
public final UnaryCallable<ListAttackPathsRequest,SecurityCenterClient.ListAttackPathsPagedResponse> listAttackPathsPagedCallable()Lists the attack paths for a set of simulation results or valued resources and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListAttackPathsRequest request = ListAttackPathsRequest.newBuilder() .setParent( ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString()) .setFilter("filter-1274492040") .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); ApiFuture<AttackPath> future = securityCenterClient.listAttackPathsPagedCallable().futureCall(request); // Do something. for (AttackPath element : future.get().iterateAll()) { // doThingsWith(element); } } -
listAttackPathsCallable
public final UnaryCallable<ListAttackPathsRequest,ListAttackPathsResponse> listAttackPathsCallable()Lists the attack paths for a set of simulation results or valued resources and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListAttackPathsRequest request = ListAttackPathsRequest.newBuilder() .setParent( ValuedResourceName.ofOrganizationSimulationValuedResourceName( "[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") .toString()) .setFilter("filter-1274492040") .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); while (true) { ListAttackPathsResponse response = securityCenterClient.listAttackPathsCallable().call(request); for (AttackPath element : response.getAttackPathsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listBigQueryExports
public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(FolderLocationName parent) Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listBigQueryExports
public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(LocationName parent) Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listBigQueryExports
public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(OrganizationLocationName parent) Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listBigQueryExports
public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(String parent) Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, or `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listBigQueryExports
public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(ListBigQueryExportsRequest request) Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListBigQueryExportsRequest request = ListBigQueryExportsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (BigQueryExport element : securityCenterClient.listBigQueryExports(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBigQueryExportsPagedCallable
public final UnaryCallable<ListBigQueryExportsRequest,SecurityCenterClient.ListBigQueryExportsPagedResponse> listBigQueryExportsPagedCallable()Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListBigQueryExportsRequest request = ListBigQueryExportsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<BigQueryExport> future = securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request); // Do something. for (BigQueryExport element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBigQueryExportsCallable
public final UnaryCallable<ListBigQueryExportsRequest,ListBigQueryExportsResponse> listBigQueryExportsCallable()Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListBigQueryExportsRequest request = ListBigQueryExportsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListBigQueryExportsResponse response = securityCenterClient.listBigQueryExportsCallable().call(request); for (BigQueryExport element : response.getBigQueryExportsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
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:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); for (ListFindingsResponse.ListFindingsResult element : securityCenterClient.listFindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of the source the findings belong to. If no location is specified, the default is global. The following list shows some examples:+ `organizations/[organization_id]/sources/[source_id]` + `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + `folders/[folder_id]/sources/[source_id]` + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + `projects/[project_id]/sources/[source_id]` + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
To list across all sources provide a source_id of `-`. The following list shows some examples:
+ `organizations/{organization_id}/sources/-` + `organizations/{organization_id}/sources/-/locations/{location_id}` + `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-locations/{location_id}` + `projects/{projects_id}/sources/-` + `projects/{projects_id}/sources/-/locations/{location_id}`
- Throws:
ApiException- if the remote call fails
-
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:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString(); for (ListFindingsResponse.ListFindingsResult element : securityCenterClient.listFindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of the source the findings belong to. If no location is specified, the default is global. The following list shows some examples:+ `organizations/[organization_id]/sources/[source_id]` + `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + `folders/[folder_id]/sources/[source_id]` + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + `projects/[project_id]/sources/[source_id]` + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
To list across all sources provide a source_id of `-`. The following list shows some examples:
+ `organizations/{organization_id}/sources/-` + `organizations/{organization_id}/sources/-/locations/{location_id}` + `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-locations/{location_id}` + `projects/{projects_id}/sources/-` + `projects/{projects_id}/sources/-/locations/{location_id}`
- Throws:
ApiException- if the remote call fails
-
listFindings
public final SecurityCenterClient.ListFindingsPagedResponse listFindings(ListFindingsRequest request) 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:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListFindingsRequest request = ListFindingsRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setFieldMask(FieldMask.newBuilder().build()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); for (ListFindingsResponse.ListFindingsResult element : securityCenterClient.listFindings(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFindingsPagedCallable
public final UnaryCallable<ListFindingsRequest,SecurityCenterClient.ListFindingsPagedResponse> listFindingsPagedCallable()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:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListFindingsRequest request = ListFindingsRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setFieldMask(FieldMask.newBuilder().build()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); ApiFuture<ListFindingsResponse.ListFindingsResult> future = securityCenterClient.listFindingsPagedCallable().futureCall(request); // Do something. for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFindingsCallable
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:
+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListFindingsRequest request = ListFindingsRequest.newBuilder() .setParent( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setFieldMask(FieldMask.newBuilder().build()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); while (true) { ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request); for (ListFindingsResponse.ListFindingsResult element : response.getListFindingsResultsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listMuteConfigs
public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(FolderLocationName parent) 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderName parent = FolderName.of("[FOLDER]"); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(OrganizationLocationName parent) 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(OrganizationName parent) 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationName.of("[ORGANIZATION]").toString(); for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]", "folders/[folder_id]`, `projects/[project_id]`, `organizations/[organization_id]/locations/[location_id]`, `folders/[folder_id]/locations/[location_id]`, `projects/[project_id]/locations/[location_id]`.- Throws:
ApiException- if the remote call fails
-
listMuteConfigs
public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(ListMuteConfigsRequest request) 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListMuteConfigsRequest request = ListMuteConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (MuteConfig element : securityCenterClient.listMuteConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listMuteConfigsPagedCallable
public final UnaryCallable<ListMuteConfigsRequest,SecurityCenterClient.ListMuteConfigsPagedResponse> listMuteConfigsPagedCallable()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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListMuteConfigsRequest request = ListMuteConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<MuteConfig> future = securityCenterClient.listMuteConfigsPagedCallable().futureCall(request); // Do something. for (MuteConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMuteConfigsCallable
public final UnaryCallable<ListMuteConfigsRequest,ListMuteConfigsResponse> listMuteConfigsCallable()Lists mute configs. 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListMuteConfigsRequest request = ListMuteConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListMuteConfigsResponse response = securityCenterClient.listMuteConfigsCallable().call(request); for (MuteConfig element : response.getMuteConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listNotificationConfigs
public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(FolderLocationName parent) Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); for (NotificationConfig element : securityCenterClient.listNotificationConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]/locations/[location_id]", "folders/[folder_id]/locations/[location_id]", or "projects/[project_id]/locations/[location_id]".- Throws:
ApiException- if the remote call fails
-
listNotificationConfigs
public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(LocationName parent) Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (NotificationConfig element : securityCenterClient.listNotificationConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]/locations/[location_id]", "folders/[folder_id]/locations/[location_id]", or "projects/[project_id]/locations/[location_id]".- Throws:
ApiException- if the remote call fails
-
listNotificationConfigs
public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(OrganizationLocationName parent) Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); for (NotificationConfig element : securityCenterClient.listNotificationConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]/locations/[location_id]", "folders/[folder_id]/locations/[location_id]", or "projects/[project_id]/locations/[location_id]".- Throws:
ApiException- if the remote call fails
-
listNotificationConfigs
public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); for (NotificationConfig element : securityCenterClient.listNotificationConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]/locations/[location_id]", "folders/[folder_id]/locations/[location_id]", or "projects/[project_id]/locations/[location_id]".- Throws:
ApiException- if the remote call fails
-
listNotificationConfigs
public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(ListNotificationConfigsRequest request) Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListNotificationConfigsRequest request = ListNotificationConfigsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); for (NotificationConfig element : securityCenterClient.listNotificationConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listNotificationConfigsPagedCallable
public final UnaryCallable<ListNotificationConfigsRequest,SecurityCenterClient.ListNotificationConfigsPagedResponse> listNotificationConfigsPagedCallable()Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListNotificationConfigsRequest request = ListNotificationConfigsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); ApiFuture<NotificationConfig> future = securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request); // Do something. for (NotificationConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listNotificationConfigsCallable
public final UnaryCallable<ListNotificationConfigsRequest,ListNotificationConfigsResponse> listNotificationConfigsCallable()Lists notification configs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListNotificationConfigsRequest request = ListNotificationConfigsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); while (true) { ListNotificationConfigsResponse response = securityCenterClient.listNotificationConfigsCallable().call(request); for (NotificationConfig element : response.getNotificationConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listResourceValueConfigs
public final SecurityCenterClient.ListResourceValueConfigsPagedResponse listResourceValueConfigs(OrganizationLocationName parent) Lists all ResourceValueConfigs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); for (ResourceValueConfig element : securityCenterClient.listResourceValueConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of resource value configs. Its format is `organizations/[organization_id]`- Throws:
ApiException- if the remote call fails
-
listResourceValueConfigs
public final SecurityCenterClient.ListResourceValueConfigsPagedResponse listResourceValueConfigs(OrganizationName parent) Lists all ResourceValueConfigs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); for (ResourceValueConfig element : securityCenterClient.listResourceValueConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of resource value configs. Its format is `organizations/[organization_id]`- Throws:
ApiException- if the remote call fails
-
listResourceValueConfigs
public final SecurityCenterClient.ListResourceValueConfigsPagedResponse listResourceValueConfigs(String parent) Lists all ResourceValueConfigs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationName.of("[ORGANIZATION]").toString(); for (ResourceValueConfig element : securityCenterClient.listResourceValueConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns the collection of resource value configs. Its format is `organizations/[organization_id]`- Throws:
ApiException- if the remote call fails
-
listResourceValueConfigs
public final SecurityCenterClient.ListResourceValueConfigsPagedResponse listResourceValueConfigs(ListResourceValueConfigsRequest request) Lists all ResourceValueConfigs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListResourceValueConfigsRequest request = ListResourceValueConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (ResourceValueConfig element : securityCenterClient.listResourceValueConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listResourceValueConfigsPagedCallable
public final UnaryCallable<ListResourceValueConfigsRequest,SecurityCenterClient.ListResourceValueConfigsPagedResponse> listResourceValueConfigsPagedCallable()Lists all ResourceValueConfigs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListResourceValueConfigsRequest request = ListResourceValueConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<ResourceValueConfig> future = securityCenterClient.listResourceValueConfigsPagedCallable().futureCall(request); // Do something. for (ResourceValueConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listResourceValueConfigsCallable
public final UnaryCallable<ListResourceValueConfigsRequest,ListResourceValueConfigsResponse> listResourceValueConfigsCallable()Lists all ResourceValueConfigs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListResourceValueConfigsRequest request = ListResourceValueConfigsRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListResourceValueConfigsResponse response = securityCenterClient.listResourceValueConfigsCallable().call(request); for (ResourceValueConfig element : response.getResourceValueConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listSources
Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FolderName parent = FolderName.of("[FOLDER]"); for (Source element : securityCenterClient.listSources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.- Throws:
ApiException- if the remote call fails
-
listSources
Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); for (Source element : securityCenterClient.listSources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.- Throws:
ApiException- if the remote call fails
-
listSources
Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); for (Source element : securityCenterClient.listSources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.- Throws:
ApiException- if the remote call fails
-
listSources
Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = OrganizationName.of("[ORGANIZATION]").toString(); for (Source element : securityCenterClient.listSources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.- Throws:
ApiException- if the remote call fails
-
listSources
Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListSourcesRequest request = ListSourcesRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); for (Source element : securityCenterClient.listSources(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listSourcesPagedCallable
public final UnaryCallable<ListSourcesRequest,SecurityCenterClient.ListSourcesPagedResponse> listSourcesPagedCallable()Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListSourcesRequest request = ListSourcesRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); ApiFuture<Source> future = securityCenterClient.listSourcesPagedCallable().futureCall(request); // Do something. for (Source element : future.get().iterateAll()) { // doThingsWith(element); } } -
listSourcesCallable
Lists all sources belonging to an organization.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListSourcesRequest request = ListSourcesRequest.newBuilder() .setParent(OrganizationName.of("[ORGANIZATION]").toString()) .setPageToken("pageToken873572522") .setPageSize(883849137) .build(); while (true) { ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request); for (Source element : response.getSourcesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listValuedResources
public final SecurityCenterClient.ListValuedResourcesPagedResponse listValuedResources(SimulationName parent) Lists the valued resources for a set of simulation results and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SimulationName parent = SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]"); for (ValuedResource element : securityCenterClient.listValuedResources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of parent to list exposed resources.Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
- Throws:
ApiException- if the remote call fails
-
listValuedResources
public final SecurityCenterClient.ListValuedResourcesPagedResponse listValuedResources(String parent) Lists the valued resources for a set of simulation results and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String parent = SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]").toString(); for (ValuedResource element : securityCenterClient.listValuedResources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of parent to list exposed resources.Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
- Throws:
ApiException- if the remote call fails
-
listValuedResources
public final SecurityCenterClient.ListValuedResourcesPagedResponse listValuedResources(ListValuedResourcesRequest request) Lists the valued resources for a set of simulation results and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListValuedResourcesRequest request = ListValuedResourcesRequest.newBuilder() .setParent( SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]") .toString()) .setFilter("filter-1274492040") .setPageToken("pageToken873572522") .setPageSize(883849137) .setOrderBy("orderBy-1207110587") .build(); for (ValuedResource element : securityCenterClient.listValuedResources(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listValuedResourcesPagedCallable
public final UnaryCallable<ListValuedResourcesRequest,SecurityCenterClient.ListValuedResourcesPagedResponse> listValuedResourcesPagedCallable()Lists the valued resources for a set of simulation results and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListValuedResourcesRequest request = ListValuedResourcesRequest.newBuilder() .setParent( SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]") .toString()) .setFilter("filter-1274492040") .setPageToken("pageToken873572522") .setPageSize(883849137) .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ValuedResource> future = securityCenterClient.listValuedResourcesPagedCallable().futureCall(request); // Do something. for (ValuedResource element : future.get().iterateAll()) { // doThingsWith(element); } } -
listValuedResourcesCallable
public final UnaryCallable<ListValuedResourcesRequest,ListValuedResourcesResponse> listValuedResourcesCallable()Lists the valued resources for a set of simulation results and filter.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ListValuedResourcesRequest request = ListValuedResourcesRequest.newBuilder() .setParent( SimulationName.ofOrganizationSimulationName("[ORGANIZATION]", "[SIMULATION]") .toString()) .setFilter("filter-1274492040") .setPageToken("pageToken873572522") .setPageSize(883849137) .setOrderBy("orderBy-1207110587") .build(); while (true) { ListValuedResourcesResponse response = securityCenterClient.listValuedResourcesCallable().call(request); for (ValuedResource element : response.getValuedResourcesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
setFindingState
Updates the state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FindingName name = FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); Finding.State state = Finding.State.forNumber(0); Finding response = securityCenterClient.setFindingState(name, state); }- Parameters:
name- Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. If no location is specified, finding is assumed to be in global. The following list shows some examples:+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
state- Required. The desired State of the finding.- Throws:
ApiException- if the remote call fails
-
setFindingState
Updates the state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]") .toString(); Finding.State state = Finding.State.forNumber(0); Finding response = securityCenterClient.setFindingState(name, state); }- Parameters:
name- Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. If no location is specified, finding is assumed to be in global. The following list shows some examples:+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
state- Required. The desired State of the finding.- Throws:
ApiException- if the remote call fails
-
setFindingState
Updates the state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SetFindingStateRequest request = SetFindingStateRequest.newBuilder() .setName( FindingName.ofOrganizationSourceFindingName( "[ORGANIZATION]", "[SOURCE]", "[FINDING]") .toString()) .build(); Finding response = securityCenterClient.setFindingState(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setFindingStateCallable
Updates the state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SetFindingStateRequest request = SetFindingStateRequest.newBuilder() .setName( FindingName.ofOrganizationSourceFindingName( "[ORGANIZATION]", "[SOURCE]", "[FINDING]") .toString()) .build(); ApiFuture<Finding> future = securityCenterClient.setFindingStateCallable().futureCall(request); // Do something. Finding response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); Policy response = securityCenterClient.setIamPolicy(resource, policy); }- Parameters:
resource- REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.policy- REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.- Throws:
ApiException- if the remote call fails
-
setIamPolicy
Sets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String resource = FolderName.of("[FOLDER]").toString(); Policy policy = Policy.newBuilder().build(); Policy response = securityCenterClient.setIamPolicy(resource, policy); }- Parameters:
resource- REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.policy- REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.- Throws:
ApiException- if the remote call fails
-
setIamPolicy
Sets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = securityCenterClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified Source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = securityCenterClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
setMute
Updates the mute state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { FindingName name = FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); Finding.Mute mute = Finding.Mute.forNumber(0); Finding response = securityCenterClient.setMute(name, mute); }- Parameters:
name- Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. If no location is specified, finding is assumed to be in global. The following list shows some examples:+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
mute- Required. The desired state of the Mute.- Throws:
ApiException- if the remote call fails
-
setMute
Updates the mute state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String name = FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]") .toString(); Finding.Mute mute = Finding.Mute.forNumber(0); Finding response = securityCenterClient.setMute(name, mute); }- Parameters:
name- Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. If no location is specified, finding is assumed to be in global. The following list shows some examples:+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
mute- Required. The desired state of the Mute.- Throws:
ApiException- if the remote call fails
-
setMute
Updates the mute state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SetMuteRequest request = SetMuteRequest.newBuilder() .setName( FindingName.ofOrganizationSourceFindingName( "[ORGANIZATION]", "[SOURCE]", "[FINDING]") .toString()) .build(); Finding response = securityCenterClient.setMute(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setMuteCallable
Updates the mute state of a finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SetMuteRequest request = SetMuteRequest.newBuilder() .setName( FindingName.ofOrganizationSourceFindingName( "[ORGANIZATION]", "[SOURCE]", "[FINDING]") .toString()) .build(); ApiFuture<Finding> future = securityCenterClient.setMuteCallable().futureCall(request); // Do something. Finding response = future.get(); } -
testIamPermissions
public final TestIamPermissionsResponse testIamPermissions(ResourceName resource, List<String> permissions) Returns the permissions that a caller has on the specified source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); List<String> permissions = new ArrayList<>(); TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource, permissions); }- Parameters:
resource- REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.permissions- The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).- Throws:
ApiException- if the remote call fails
-
testIamPermissions
public final TestIamPermissionsResponse testIamPermissions(String resource, List<String> permissions) Returns the permissions that a caller has on the specified source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { String resource = FolderName.of("[FOLDER]").toString(); List<String> permissions = new ArrayList<>(); TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource, permissions); }- Parameters:
resource- REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.permissions- The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).- Throws:
ApiException- if the remote call fails
-
testIamPermissions
Returns the permissions that a caller has on the specified source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns the permissions that a caller has on the specified source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = securityCenterClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
updateBigQueryExport
public final BigQueryExport updateBigQueryExport(BigQueryExport bigQueryExport, com.google.protobuf.FieldMask updateMask) Updates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); BigQueryExport response = securityCenterClient.updateBigQueryExport(bigQueryExport, updateMask); }- Parameters:
bigQueryExport- Required. The BigQuery export being updated.updateMask- The list of fields to be updated. If empty all mutable fields will be updated.- Throws:
ApiException- if the remote call fails
-
updateBigQueryExport
Updates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateBigQueryExportRequest request = UpdateBigQueryExportRequest.newBuilder() .setBigQueryExport(BigQueryExport.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); BigQueryExport response = securityCenterClient.updateBigQueryExport(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBigQueryExportCallable
public final UnaryCallable<UpdateBigQueryExportRequest,BigQueryExport> updateBigQueryExportCallable()Updates a BigQuery export.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateBigQueryExportRequest request = UpdateBigQueryExportRequest.newBuilder() .setBigQueryExport(BigQueryExport.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<BigQueryExport> future = securityCenterClient.updateBigQueryExportCallable().futureCall(request); // Do something. BigQueryExport response = future.get(); } -
updateExternalSystem
public final ExternalSystem updateExternalSystem(ExternalSystem externalSystem, com.google.protobuf.FieldMask updateMask) Updates external system. This is for a given finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ExternalSystem externalSystem = ExternalSystem.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ExternalSystem response = securityCenterClient.updateExternalSystem(externalSystem, updateMask); }- Parameters:
externalSystem- Required. The external system resource to update.updateMask- The FieldMask to use when updating the external system resource.If empty all mutable fields will be updated.
- Throws:
ApiException- if the remote call fails
-
updateExternalSystem
Updates external system. This is for a given finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateExternalSystemRequest request = UpdateExternalSystemRequest.newBuilder() .setExternalSystem(ExternalSystem.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ExternalSystem response = securityCenterClient.updateExternalSystem(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateExternalSystemCallable
public final UnaryCallable<UpdateExternalSystemRequest,ExternalSystem> updateExternalSystemCallable()Updates external system. This is for a given finding. If no location is specified, finding is assumed to be in globalSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateExternalSystemRequest request = UpdateExternalSystemRequest.newBuilder() .setExternalSystem(ExternalSystem.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<ExternalSystem> future = securityCenterClient.updateExternalSystemCallable().futureCall(request); // Do something. ExternalSystem response = future.get(); } -
updateFinding
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { Finding finding = Finding.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Finding response = securityCenterClient.updateFinding(finding, updateMask); }- Parameters:
finding- Required. The finding resource to update or create if it does not already exist. parent, security_marks, and update_time will be ignored.In the case of creation, the finding id portion of the name must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.
updateMask- 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.<property key>" in the field mask.
- Throws:
ApiException- if the remote call fails
-
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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateFindingRequest request = UpdateFindingRequest.newBuilder() .setFinding(Finding.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Finding response = securityCenterClient.updateFinding(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFindingCallable
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateFindingRequest request = UpdateFindingRequest.newBuilder() .setFinding(Finding.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Finding> future = securityCenterClient.updateFindingCallable().futureCall(request); // Do something. Finding response = future.get(); } -
updateMuteConfig
public final MuteConfig updateMuteConfig(MuteConfig muteConfig, com.google.protobuf.FieldMask updateMask) Updates a mute config. 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { MuteConfig muteConfig = MuteConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); MuteConfig response = securityCenterClient.updateMuteConfig(muteConfig, updateMask); }- Parameters:
muteConfig- Required. The mute config being updated.updateMask- The list of fields to be updated. If empty all mutable fields will be updated.- Throws:
ApiException- if the remote call fails
-
updateMuteConfig
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateMuteConfigRequest request = UpdateMuteConfigRequest.newBuilder() .setMuteConfig(MuteConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); MuteConfig response = securityCenterClient.updateMuteConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMuteConfigCallable
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateMuteConfigRequest request = UpdateMuteConfigRequest.newBuilder() .setMuteConfig(MuteConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<MuteConfig> future = securityCenterClient.updateMuteConfigCallable().futureCall(request); // Do something. MuteConfig response = future.get(); } -
updateNotificationConfig
public final NotificationConfig updateNotificationConfig(NotificationConfig notificationConfig, com.google.protobuf.FieldMask updateMask) Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filterSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); NotificationConfig response = securityCenterClient.updateNotificationConfig(notificationConfig, updateMask); }- Parameters:
notificationConfig- Required. The notification config to update.updateMask- The FieldMask to use when updating the notification config.If empty all mutable fields will be updated.
- Throws:
ApiException- if the remote call fails
-
updateNotificationConfig
Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filterSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateNotificationConfigRequest request = UpdateNotificationConfigRequest.newBuilder() .setNotificationConfig(NotificationConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); NotificationConfig response = securityCenterClient.updateNotificationConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateNotificationConfigCallable
public final UnaryCallable<UpdateNotificationConfigRequest,NotificationConfig> updateNotificationConfigCallable()Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filterSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateNotificationConfigRequest request = UpdateNotificationConfigRequest.newBuilder() .setNotificationConfig(NotificationConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<NotificationConfig> future = securityCenterClient.updateNotificationConfigCallable().futureCall(request); // Do something. NotificationConfig response = future.get(); } -
updateResourceValueConfig
public final ResourceValueConfig updateResourceValueConfig(ResourceValueConfig resourceValueConfig, com.google.protobuf.FieldMask updateMask) Updates an existing ResourceValueConfigs with new rules.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { ResourceValueConfig resourceValueConfig = ResourceValueConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ResourceValueConfig response = securityCenterClient.updateResourceValueConfig(resourceValueConfig, updateMask); }- Parameters:
resourceValueConfig- Required. The resource value config being updated.updateMask- The list of fields to be updated. If empty all mutable fields will be updated.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
- Throws:
ApiException- if the remote call fails
-
updateResourceValueConfig
public final ResourceValueConfig updateResourceValueConfig(UpdateResourceValueConfigRequest request) Updates an existing ResourceValueConfigs with new rules.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateResourceValueConfigRequest request = UpdateResourceValueConfigRequest.newBuilder() .setResourceValueConfig(ResourceValueConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ResourceValueConfig response = securityCenterClient.updateResourceValueConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateResourceValueConfigCallable
public final UnaryCallable<UpdateResourceValueConfigRequest,ResourceValueConfig> updateResourceValueConfigCallable()Updates an existing ResourceValueConfigs with new rules.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateResourceValueConfigRequest request = UpdateResourceValueConfigRequest.newBuilder() .setResourceValueConfig(ResourceValueConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<ResourceValueConfig> future = securityCenterClient.updateResourceValueConfigCallable().futureCall(request); // Do something. ResourceValueConfig response = future.get(); } -
updateSecurityMarks
public final SecurityMarks updateSecurityMarks(SecurityMarks securityMarks, com.google.protobuf.FieldMask updateMask) 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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { SecurityMarks securityMarks = SecurityMarks.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); SecurityMarks response = securityCenterClient.updateSecurityMarks(securityMarks, updateMask); }- Parameters:
securityMarks- Required. The security marks resource to update.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.<mark_key>".
- Throws:
ApiException- if the remote call fails
-
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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateSecurityMarksRequest request = UpdateSecurityMarksRequest.newBuilder() .setSecurityMarks(SecurityMarks.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); SecurityMarks response = securityCenterClient.updateSecurityMarks(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSecurityMarksCallable
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_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateSecurityMarksRequest request = UpdateSecurityMarksRequest.newBuilder() .setSecurityMarks(SecurityMarks.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<SecurityMarks> future = securityCenterClient.updateSecurityMarksCallable().futureCall(request); // Do something. SecurityMarks response = future.get(); } -
updateSource
Updates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { Source source = Source.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Source response = securityCenterClient.updateSource(source, updateMask); }- Parameters:
source- Required. The source resource to update.updateMask- The FieldMask to use when updating the source resource.If empty all mutable fields will be updated.
- Throws:
ApiException- if the remote call fails
-
updateSource
Updates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateSourceRequest request = UpdateSourceRequest.newBuilder() .setSource(Source.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Source response = securityCenterClient.updateSource(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSourceCallable
Updates a source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { UpdateSourceRequest request = UpdateSourceRequest.newBuilder() .setSource(Source.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Source> future = securityCenterClient.updateSourceCallable().futureCall(request); // Do something. Source response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-