Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible. v1
Package
@google-cloud/web-security-scannerConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of WebSecurityScannerClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
webSecurityScannerStub
webSecurityScannerStub?: Promise<{
[name: string]: Function;
}>;
Methods
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createScanConfig(request, options)
createScanConfig(request?: protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig,
(protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest | undefined),
{} | undefined
]>;
Creates a new ScanConfig.
Parameters | |
---|---|
Name | Description |
request |
ICreateScanConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig,
(protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name where the scan is created, which should be a
* project resource name in the format 'projects/{projectId}'.
*/
// const parent = 'abc123'
/**
* Required. The ScanConfig to be created.
*/
// const scanConfig = {}
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callCreateScanConfig() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.createScanConfig(request);
console.log(response);
}
callCreateScanConfig();
createScanConfig(request, options, callback)
createScanConfig(request: protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateScanConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createScanConfig(request, callback)
createScanConfig(request: protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateScanConfigRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.ICreateScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteScanConfig(request, options)
deleteScanConfig(request?: protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest | undefined),
{} | undefined
]>;
Deletes an existing ScanConfig and its child resources.
Parameters | |
---|---|
Name | Description |
request |
IDeleteScanConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the ScanConfig to be deleted. The name follows the
* format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
// const name = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callDeleteScanConfig() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.deleteScanConfig(request);
console.log(response);
}
callDeleteScanConfig();
deleteScanConfig(request, options, callback)
deleteScanConfig(request: protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteScanConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteScanConfig(request, callback)
deleteScanConfig(request: protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteScanConfigRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.websecurityscanner.v1.IDeleteScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
findingPath(project, scanConfig, scanRun, finding)
findingPath(project: string, scanConfig: string, scanRun: string, finding: string): string;
Return a fully-qualified finding resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
scanConfig |
string
|
scanRun |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getFinding(request, options)
getFinding(request?: protos.google.cloud.websecurityscanner.v1.IGetFindingRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IFinding,
protos.google.cloud.websecurityscanner.v1.IGetFindingRequest | undefined,
{} | undefined
]>;
Gets a Finding.
Parameters | |
---|---|
Name | Description |
request |
IGetFindingRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IFinding,
protos.google.cloud.websecurityscanner.v1.IGetFindingRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the Finding to be returned. The name follows the
* format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.
*/
// const name = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callGetFinding() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.getFinding(request);
console.log(response);
}
callGetFinding();
getFinding(request, options, callback)
getFinding(request: protos.google.cloud.websecurityscanner.v1.IGetFindingRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IFinding, protos.google.cloud.websecurityscanner.v1.IGetFindingRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetFindingRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IFinding, protos.google.cloud.websecurityscanner.v1.IGetFindingRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getFinding(request, callback)
getFinding(request: protos.google.cloud.websecurityscanner.v1.IGetFindingRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IFinding, protos.google.cloud.websecurityscanner.v1.IGetFindingRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetFindingRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IFinding, protos.google.cloud.websecurityscanner.v1.IGetFindingRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
getScanConfig(request, options)
getScanConfig(request?: protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig,
(protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest | undefined),
{} | undefined
]>;
Gets a ScanConfig.
Parameters | |
---|---|
Name | Description |
request |
IGetScanConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig,
(protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the ScanConfig to be returned. The name follows the
* format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
// const name = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callGetScanConfig() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.getScanConfig(request);
console.log(response);
}
callGetScanConfig();
getScanConfig(request, options, callback)
getScanConfig(request: protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetScanConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getScanConfig(request, callback)
getScanConfig(request: protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetScanConfigRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IGetScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getScanRun(request, options)
getScanRun(request?: protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun,
protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest | undefined,
{} | undefined
]>;
Gets a ScanRun.
Parameters | |
---|---|
Name | Description |
request |
IGetScanRunRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun,
protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the ScanRun to be returned. The name follows the
* format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
// const name = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callGetScanRun() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.getScanRun(request);
console.log(response);
}
callGetScanRun();
getScanRun(request, options, callback)
getScanRun(request: protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetScanRunRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getScanRun(request, callback)
getScanRun(request: protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetScanRunRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IGetScanRunRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns | |
---|---|
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
listCrawledUrls(request, options)
listCrawledUrls(request?: protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.ICrawledUrl[],
protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsResponse
]>;
List CrawledUrls under a given ScanRun.
Parameters | |
---|---|
Name | Description |
request |
IListCrawledUrlsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.ICrawledUrl[],
protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of CrawledUrl. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listCrawledUrls(request, options, callback)
listCrawledUrls(request: protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.ICrawledUrl>): void;
Parameters | |
---|---|
Name | Description |
request |
IListCrawledUrlsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.ICrawledUrl>
|
Returns | |
---|---|
Type | Description |
void |
listCrawledUrls(request, callback)
listCrawledUrls(request: protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.ICrawledUrl>): void;
Parameters | |
---|---|
Name | Description |
request |
IListCrawledUrlsRequest
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.ICrawledUrl>
|
Returns | |
---|---|
Type | Description |
void |
listCrawledUrlsAsync(request, options)
listCrawledUrlsAsync(request?: protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.websecurityscanner.v1.ICrawledUrl>;
Equivalent to listCrawledUrls
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListCrawledUrlsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.websecurityscanner.v1.ICrawledUrl> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CrawledUrl. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name, which should be a scan run resource name in the
* format
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
// const parent = 'abc123'
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request.
* If unspecified, the first page of results is returned.
*/
// const pageToken = 'abc123'
/**
* The maximum number of CrawledUrls to return, can be limited by server.
* If not specified or not positive, the implementation will select a
* reasonable value.
*/
// const pageSize = 1234
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callListCrawledUrls() {
// Construct request
const request = {
};
// Run request
const iterable = await websecurityscannerClient.listCrawledUrlsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListCrawledUrls();
listCrawledUrlsStream(request, options)
listCrawledUrlsStream(request?: protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListCrawledUrlsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing CrawledUrl on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listFindings(request, options)
listFindings(request?: protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IFinding[],
protos.google.cloud.websecurityscanner.v1.IListFindingsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListFindingsResponse
]>;
List Findings under a given ScanRun.
Parameters | |
---|---|
Name | Description |
request |
IListFindingsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IFinding[],
protos.google.cloud.websecurityscanner.v1.IListFindingsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListFindingsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listFindings(request, options, callback)
listFindings(request: protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, protos.google.cloud.websecurityscanner.v1.IListFindingsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IFinding>): void;
Parameters | |
---|---|
Name | Description |
request |
IListFindingsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, protos.google.cloud.websecurityscanner.v1.IListFindingsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IFinding>
|
Returns | |
---|---|
Type | Description |
void |
listFindings(request, callback)
listFindings(request: protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, protos.google.cloud.websecurityscanner.v1.IListFindingsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IFinding>): void;
Parameters | |
---|---|
Name | Description |
request |
IListFindingsRequest
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, protos.google.cloud.websecurityscanner.v1.IListFindingsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IFinding>
|
Returns | |
---|---|
Type | Description |
void |
listFindingsAsync(request, options)
listFindingsAsync(request?: protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.websecurityscanner.v1.IFinding>;
Equivalent to listFindings
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListFindingsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.websecurityscanner.v1.IFinding> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name, which should be a scan run resource name in the
* format
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
// const parent = 'abc123'
/**
* The filter expression. The expression must be in the format:
listFindingsStream(request, options)
listFindingsStream(request?: protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListFindingsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listFindingTypeStats(request, options)
listFindingTypeStats(request?: protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsResponse,
(protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest | undefined),
{} | undefined
]>;
List all FindingTypeStats under a given ScanRun.
Parameters | |
---|---|
Name | Description |
request |
IListFindingTypeStatsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsResponse,
(protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing ListFindingTypeStatsResponse. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name, which should be a scan run resource name in the
* format
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
// const parent = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callListFindingTypeStats() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.listFindingTypeStats(request);
console.log(response);
}
callListFindingTypeStats();
listFindingTypeStats(request, options, callback)
listFindingTypeStats(request: protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsResponse, protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IListFindingTypeStatsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsResponse, protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
listFindingTypeStats(request, callback)
listFindingTypeStats(request: protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsResponse, protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IListFindingTypeStatsRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsResponse, protos.google.cloud.websecurityscanner.v1.IListFindingTypeStatsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
listScanConfigs(request, options)
listScanConfigs(request?: protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig[],
protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListScanConfigsResponse
]>;
Lists ScanConfigs under a given project.
Parameters | |
---|---|
Name | Description |
request |
IListScanConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig[],
protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListScanConfigsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listScanConfigs(request, options, callback)
listScanConfigs(request: protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, protos.google.cloud.websecurityscanner.v1.IListScanConfigsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanConfig>): void;
Parameters | |
---|---|
Name | Description |
request |
IListScanConfigsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, protos.google.cloud.websecurityscanner.v1.IListScanConfigsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanConfig>
|
Returns | |
---|---|
Type | Description |
void |
listScanConfigs(request, callback)
listScanConfigs(request: protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, protos.google.cloud.websecurityscanner.v1.IListScanConfigsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanConfig>): void;
Parameters | |
---|---|
Name | Description |
request |
IListScanConfigsRequest
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, protos.google.cloud.websecurityscanner.v1.IListScanConfigsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanConfig>
|
Returns | |
---|---|
Type | Description |
void |
listScanConfigsAsync(request, options)
listScanConfigsAsync(request?: protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.websecurityscanner.v1.IScanConfig>;
Equivalent to listScanConfigs
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListScanConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.websecurityscanner.v1.IScanConfig> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name, which should be a project resource name in the
* format 'projects/{projectId}'.
*/
// const parent = 'abc123'
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request.
* If unspecified, the first page of results is returned.
*/
// const pageToken = 'abc123'
/**
* The maximum number of ScanConfigs to return, can be limited by server.
* If not specified or not positive, the implementation will select a
* reasonable value.
*/
// const pageSize = 1234
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callListScanConfigs() {
// Construct request
const request = {
};
// Run request
const iterable = await websecurityscannerClient.listScanConfigsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListScanConfigs();
listScanConfigsStream(request, options)
listScanConfigsStream(request?: protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListScanConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listScanRuns(request, options)
listScanRuns(request?: protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun[],
protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListScanRunsResponse
]>;
Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.
Parameters | |
---|---|
Name | Description |
request |
IListScanRunsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun[],
protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest | null,
protos.google.cloud.websecurityscanner.v1.IListScanRunsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listScanRuns(request, options, callback)
listScanRuns(request: protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, protos.google.cloud.websecurityscanner.v1.IListScanRunsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanRun>): void;
Parameters | |
---|---|
Name | Description |
request |
IListScanRunsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, protos.google.cloud.websecurityscanner.v1.IListScanRunsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanRun>
|
Returns | |
---|---|
Type | Description |
void |
listScanRuns(request, callback)
listScanRuns(request: protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, callback: PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, protos.google.cloud.websecurityscanner.v1.IListScanRunsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanRun>): void;
Parameters | |
---|---|
Name | Description |
request |
IListScanRunsRequest
|
callback |
PaginationCallback<protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, protos.google.cloud.websecurityscanner.v1.IListScanRunsResponse | null | undefined, protos.google.cloud.websecurityscanner.v1.IScanRun>
|
Returns | |
---|---|
Type | Description |
void |
listScanRunsAsync(request, options)
listScanRunsAsync(request?: protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.websecurityscanner.v1.IScanRun>;
Equivalent to listScanRuns
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListScanRunsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.websecurityscanner.v1.IScanRun> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name, which should be a scan resource name in the
* format 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
// const parent = 'abc123'
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request.
* If unspecified, the first page of results is returned.
*/
// const pageToken = 'abc123'
/**
* The maximum number of ScanRuns to return, can be limited by server.
* If not specified or not positive, the implementation will select a
* reasonable value.
*/
// const pageSize = 1234
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callListScanRuns() {
// Construct request
const request = {
};
// Run request
const iterable = await websecurityscannerClient.listScanRunsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListScanRuns();
listScanRunsStream(request, options)
listScanRunsStream(request?: protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListScanRunsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
matchFindingFromFindingName(findingName)
matchFindingFromFindingName(findingName: string): string | number;
Parse the finding from Finding resource.
Parameter | |
---|---|
Name | Description |
findingName |
string
A fully-qualified path representing Finding resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the finding. |
matchProjectFromFindingName(findingName)
matchProjectFromFindingName(findingName: string): string | number;
Parse the project from Finding resource.
Parameter | |
---|---|
Name | Description |
findingName |
string
A fully-qualified path representing Finding resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchScanConfigFromFindingName(findingName)
matchScanConfigFromFindingName(findingName: string): string | number;
Parse the scan_config from Finding resource.
Parameter | |
---|---|
Name | Description |
findingName |
string
A fully-qualified path representing Finding resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the scan_config. |
matchScanRunFromFindingName(findingName)
matchScanRunFromFindingName(findingName: string): string | number;
Parse the scan_run from Finding resource.
Parameter | |
---|---|
Name | Description |
findingName |
string
A fully-qualified path representing Finding resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the scan_run. |
startScanRun(request, options)
startScanRun(request?: protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun,
(protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest | undefined),
{} | undefined
]>;
Start a ScanRun according to the given ScanConfig.
Parameters | |
---|---|
Name | Description |
request |
IStartScanRunRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun,
(protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the ScanConfig to be used. The name follows the
* format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
// const name = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callStartScanRun() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.startScanRun(request);
console.log(response);
}
callStartScanRun();
startScanRun(request, options, callback)
startScanRun(request: protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IStartScanRunRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
startScanRun(request, callback)
startScanRun(request: protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IStartScanRunRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStartScanRunRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
stopScanRun(request, options)
stopScanRun(request?: protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun,
protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest | undefined,
{} | undefined
]>;
Stops a ScanRun. The stopped ScanRun is returned.
Parameters | |
---|---|
Name | Description |
request |
IStopScanRunRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanRun,
protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the ScanRun to be stopped. The name follows the
* format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
// const name = 'abc123'
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callStopScanRun() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.stopScanRun(request);
console.log(response);
}
callStopScanRun();
stopScanRun(request, options, callback)
stopScanRun(request: protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IStopScanRunRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
stopScanRun(request, callback)
stopScanRun(request: protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IStopScanRunRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanRun, protos.google.cloud.websecurityscanner.v1.IStopScanRunRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateScanConfig(request, options)
updateScanConfig(request?: protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest, options?: CallOptions): Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig,
(protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest | undefined),
{} | undefined
]>;
Updates a ScanConfig. This method support partial update of a ScanConfig.
Parameters | |
---|---|
Name | Description |
request |
IUpdateScanConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.websecurityscanner.v1.IScanConfig,
(protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The ScanConfig to be updated. The name field must be set to identify the
* resource to be updated. The values of fields not covered by the mask
* will be ignored.
*/
// const scanConfig = {}
/**
* Required. The update mask applies to the resource. For the `FieldMask` definition,
* see
* https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
*/
// const updateMask = {}
// Imports the Websecurityscanner library
const {WebSecurityScannerClient} = require('@google-cloud/web-security-scanner').v1;
// Instantiates a client
const websecurityscannerClient = new WebSecurityScannerClient();
async function callUpdateScanConfig() {
// Construct request
const request = {
};
// Run request
const response = await websecurityscannerClient.updateScanConfig(request);
console.log(response);
}
callUpdateScanConfig();
updateScanConfig(request, options, callback)
updateScanConfig(request: protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateScanConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateScanConfig(request, callback)
updateScanConfig(request: protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest, callback: Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateScanConfigRequest
|
callback |
Callback<protos.google.cloud.websecurityscanner.v1.IScanConfig, protos.google.cloud.websecurityscanner.v1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |