@BetaApi @Generated(value="by gapic-generator") public class WebSecurityScannerClient extends Object implements com.google.api.gax.core.BackgroundResource
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:
Note: close() needs to be called on the WebSecurityScannerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
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 WebSecurityScannerSettings to create(). For example:
To customize credentials:
WebSecurityScannerSettings webSecurityScannerSettings =
WebSecurityScannerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
WebSecurityScannerClient webSecurityScannerClient =
WebSecurityScannerClient.create(webSecurityScannerSettings);
To customize the endpoint:
WebSecurityScannerSettings webSecurityScannerSettings =
WebSecurityScannerSettings.newBuilder().setEndpoint(myEndpoint).build();
WebSecurityScannerClient webSecurityScannerClient =
WebSecurityScannerClient.create(webSecurityScannerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
WebSecurityScannerClient.ListCrawledUrlsFixedSizeCollection |
static class |
WebSecurityScannerClient.ListCrawledUrlsPage |
static class |
WebSecurityScannerClient.ListCrawledUrlsPagedResponse |
static class |
WebSecurityScannerClient.ListFindingsFixedSizeCollection |
static class |
WebSecurityScannerClient.ListFindingsPage |
static class |
WebSecurityScannerClient.ListFindingsPagedResponse |
static class |
WebSecurityScannerClient.ListScanConfigsFixedSizeCollection |
static class |
WebSecurityScannerClient.ListScanConfigsPage |
static class |
WebSecurityScannerClient.ListScanConfigsPagedResponse |
static class |
WebSecurityScannerClient.ListScanRunsFixedSizeCollection |
static class |
WebSecurityScannerClient.ListScanRunsPage |
static class |
WebSecurityScannerClient.ListScanRunsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
WebSecurityScannerClient(WebSecurityScannerSettings settings)
Constructs an instance of WebSecurityScannerClient, using the given settings.
|
protected |
WebSecurityScannerClient(WebSecurityScannerStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static WebSecurityScannerClient |
create()
Constructs an instance of WebSecurityScannerClient with default settings.
|
static WebSecurityScannerClient |
create(WebSecurityScannerSettings settings)
Constructs an instance of WebSecurityScannerClient, using the given settings.
|
static WebSecurityScannerClient |
create(WebSecurityScannerStub stub)
Constructs an instance of WebSecurityScannerClient, using the given stub for making calls.
|
ScanConfig |
createScanConfig(CreateScanConfigRequest request)
Creates a new ScanConfig.
|
com.google.api.gax.rpc.UnaryCallable<CreateScanConfigRequest,ScanConfig> |
createScanConfigCallable()
Creates a new ScanConfig.
|
void |
deleteScanConfig(DeleteScanConfigRequest request)
Deletes an existing ScanConfig and its child resources.
|
com.google.api.gax.rpc.UnaryCallable<DeleteScanConfigRequest,com.google.protobuf.Empty> |
deleteScanConfigCallable()
Deletes an existing ScanConfig and its child resources.
|
Finding |
getFinding(GetFindingRequest request)
Gets a Finding.
|
com.google.api.gax.rpc.UnaryCallable<GetFindingRequest,Finding> |
getFindingCallable()
Gets a Finding.
|
ScanConfig |
getScanConfig(GetScanConfigRequest request)
Gets a ScanConfig.
|
com.google.api.gax.rpc.UnaryCallable<GetScanConfigRequest,ScanConfig> |
getScanConfigCallable()
Gets a ScanConfig.
|
ScanRun |
getScanRun(GetScanRunRequest request)
Gets a ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<GetScanRunRequest,ScanRun> |
getScanRunCallable()
Gets a ScanRun.
|
WebSecurityScannerSettings |
getSettings() |
WebSecurityScannerStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
WebSecurityScannerClient.ListCrawledUrlsPagedResponse |
listCrawledUrls(ListCrawledUrlsRequest request)
List CrawledUrls under a given ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<ListCrawledUrlsRequest,ListCrawledUrlsResponse> |
listCrawledUrlsCallable()
List CrawledUrls under a given ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<ListCrawledUrlsRequest,WebSecurityScannerClient.ListCrawledUrlsPagedResponse> |
listCrawledUrlsPagedCallable()
List CrawledUrls under a given ScanRun.
|
WebSecurityScannerClient.ListFindingsPagedResponse |
listFindings(ListFindingsRequest request)
List Findings under a given ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<ListFindingsRequest,ListFindingsResponse> |
listFindingsCallable()
List Findings under a given ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<ListFindingsRequest,WebSecurityScannerClient.ListFindingsPagedResponse> |
listFindingsPagedCallable()
List Findings under a given ScanRun.
|
ListFindingTypeStatsResponse |
listFindingTypeStats(ListFindingTypeStatsRequest request)
List all FindingTypeStats under a given ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<ListFindingTypeStatsRequest,ListFindingTypeStatsResponse> |
listFindingTypeStatsCallable()
List all FindingTypeStats under a given ScanRun.
|
WebSecurityScannerClient.ListScanConfigsPagedResponse |
listScanConfigs(ListScanConfigsRequest request)
Lists ScanConfigs under a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListScanConfigsRequest,ListScanConfigsResponse> |
listScanConfigsCallable()
Lists ScanConfigs under a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListScanConfigsRequest,WebSecurityScannerClient.ListScanConfigsPagedResponse> |
listScanConfigsPagedCallable()
Lists ScanConfigs under a given project.
|
WebSecurityScannerClient.ListScanRunsPagedResponse |
listScanRuns(ListScanRunsRequest request)
Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.
|
com.google.api.gax.rpc.UnaryCallable<ListScanRunsRequest,ListScanRunsResponse> |
listScanRunsCallable()
Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.
|
com.google.api.gax.rpc.UnaryCallable<ListScanRunsRequest,WebSecurityScannerClient.ListScanRunsPagedResponse> |
listScanRunsPagedCallable()
Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.
|
void |
shutdown() |
void |
shutdownNow() |
ScanRun |
startScanRun(StartScanRunRequest request)
Start a ScanRun according to the given ScanConfig.
|
com.google.api.gax.rpc.UnaryCallable<StartScanRunRequest,ScanRun> |
startScanRunCallable()
Start a ScanRun according to the given ScanConfig.
|
ScanRun |
stopScanRun(StopScanRunRequest request)
Stops a ScanRun.
|
com.google.api.gax.rpc.UnaryCallable<StopScanRunRequest,ScanRun> |
stopScanRunCallable()
Stops a ScanRun.
|
ScanConfig |
updateScanConfig(UpdateScanConfigRequest request)
Updates a ScanConfig.
|
com.google.api.gax.rpc.UnaryCallable<UpdateScanConfigRequest,ScanConfig> |
updateScanConfigCallable()
Updates a ScanConfig.
|
protected WebSecurityScannerClient(WebSecurityScannerSettings settings) throws IOException
IOException@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected WebSecurityScannerClient(WebSecurityScannerStub stub)
public static final WebSecurityScannerClient create() throws IOException
IOExceptionpublic static final WebSecurityScannerClient create(WebSecurityScannerSettings settings) throws IOException
IOException@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final WebSecurityScannerClient create(WebSecurityScannerStub stub)
public final WebSecurityScannerSettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public WebSecurityScannerStub getStub()
public final ScanConfig createScanConfig(CreateScanConfigRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateScanConfigRequest,ScanConfig> createScanConfigCallable()
Sample code:
public final void deleteScanConfig(DeleteScanConfigRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteScanConfigRequest,com.google.protobuf.Empty> deleteScanConfigCallable()
Sample code:
public final ScanConfig getScanConfig(GetScanConfigRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetScanConfigRequest,ScanConfig> getScanConfigCallable()
Sample code:
public final WebSecurityScannerClient.ListScanConfigsPagedResponse listScanConfigs(ListScanConfigsRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListScanConfigsRequest,WebSecurityScannerClient.ListScanConfigsPagedResponse> listScanConfigsPagedCallable()
Sample code:
public final com.google.api.gax.rpc.UnaryCallable<ListScanConfigsRequest,ListScanConfigsResponse> listScanConfigsCallable()
Sample code:
public final ScanConfig updateScanConfig(UpdateScanConfigRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateScanConfigRequest,ScanConfig> updateScanConfigCallable()
Sample code:
public final ScanRun startScanRun(StartScanRunRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<StartScanRunRequest,ScanRun> startScanRunCallable()
Sample code:
public final ScanRun getScanRun(GetScanRunRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetScanRunRequest,ScanRun> getScanRunCallable()
Sample code:
public final WebSecurityScannerClient.ListScanRunsPagedResponse listScanRuns(ListScanRunsRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListScanRunsRequest,WebSecurityScannerClient.ListScanRunsPagedResponse> listScanRunsPagedCallable()
Sample code:
public final com.google.api.gax.rpc.UnaryCallable<ListScanRunsRequest,ListScanRunsResponse> listScanRunsCallable()
Sample code:
public final ScanRun stopScanRun(StopScanRunRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<StopScanRunRequest,ScanRun> stopScanRunCallable()
Sample code:
public final WebSecurityScannerClient.ListCrawledUrlsPagedResponse listCrawledUrls(ListCrawledUrlsRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCrawledUrlsRequest,WebSecurityScannerClient.ListCrawledUrlsPagedResponse> listCrawledUrlsPagedCallable()
Sample code:
public final com.google.api.gax.rpc.UnaryCallable<ListCrawledUrlsRequest,ListCrawledUrlsResponse> listCrawledUrlsCallable()
Sample code:
public final Finding getFinding(GetFindingRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetFindingRequest,Finding> getFindingCallable()
Sample code:
public final WebSecurityScannerClient.ListFindingsPagedResponse listFindings(ListFindingsRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListFindingsRequest,WebSecurityScannerClient.ListFindingsPagedResponse> listFindingsPagedCallable()
Sample code:
public final com.google.api.gax.rpc.UnaryCallable<ListFindingsRequest,ListFindingsResponse> listFindingsCallable()
Sample code:
public final ListFindingTypeStatsResponse listFindingTypeStats(ListFindingTypeStatsRequest request)
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListFindingTypeStatsRequest,ListFindingTypeStatsResponse> listFindingTypeStatsCallable()
Sample code:
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2020 Google LLC. All rights reserved.