Retrieves analysis results of Cloud components such as Docker container images. The Container Analysis API is an implementation of the [Grafeas](https://grafeas.io) API.
Analysis results are stored as a series of occurrences. An Occurrence
contains information about a specific analysis instance on a resource. An occurrence refers to a Note
. A note contains details describing the analysis and is generally stored in a separate project, called a Provider
. Multiple occurrences can refer to the same note.
For example, an SSL vulnerability could affect multiple images. In this case, there would be one note for the vulnerability and an occurrence for each image with the vulnerability referring to that note. v1beta1
Package
@google-cloud/containeranalysisConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of ContainerAnalysisV1Beta1Client.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.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;
containerAnalysisV1Beta1Stub
containerAnalysisV1Beta1Stub?: Promise<{
[name: string]: Function;
}>;
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;
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. |
getIamPolicy(request, options)
getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.IGetIamPolicyRequest | undefined,
{} | undefined
]>;
Gets the access control policy for a note or an occurrence resource. Requires containeranalysis.notes.setIamPolicy
or containeranalysis.occurrences.setIamPolicy
permission if the resource is a note or occurrence, respectively.
The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID]
for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]
for occurrences.
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.IGetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.IGetIamPolicyRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`.
*/
// const options = {}
// Imports the Containeranalysis library
const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1;
// Instantiates a client
const containeranalysisClient = new ContainerAnalysisV1Beta1Client();
async function callGetIamPolicy() {
// Construct request
const request = {
resource,
};
// Run request
const response = await containeranalysisClient.getIamPolicy(request);
console.log(response);
}
callGetIamPolicy();
getIamPolicy(request, options, callback)
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.IGetIamPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getIamPolicy(request, callback)
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.IGetIamPolicyRequest
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | 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.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, options?: CallOptions): Promise<[
protos.google.devtools.containeranalysis.v1beta1.IScanConfig,
(protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest | undefined),
{} | undefined
]>;
Gets the specified scan configuration.
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.devtools.containeranalysis.v1beta1.IScanConfig,
(protos.google.devtools.containeranalysis.v1beta1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 name of the scan configuration in the form of
* `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
*/
// const name = 'abc123'
// Imports the Containeranalysis library
const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1;
// Instantiates a client
const containeranalysisClient = new ContainerAnalysisV1Beta1Client();
async function callGetScanConfig() {
// Construct request
const request = {
name,
};
// Run request
const response = await containeranalysisClient.getScanConfig(request);
console.log(response);
}
callGetScanConfig();
getScanConfig(request, options, callback)
getScanConfig(request: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, options: CallOptions, callback: Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getScanConfig(request, callback)
getScanConfig(request: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, callback: Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest
|
callback |
Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest | 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. |
listScanConfigs(request, options)
listScanConfigs(request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, options?: CallOptions): Promise<[
protos.google.devtools.containeranalysis.v1beta1.IScanConfig[],
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest | null,
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse
]>;
Lists scan configurations for the specified project.
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.devtools.containeranalysis.v1beta1.IScanConfig[],
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest | null,
protos.google.devtools.containeranalysis.v1beta1.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.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse | null | undefined, protos.google.devtools.containeranalysis.v1beta1.IScanConfig>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse | null | undefined, protos.google.devtools.containeranalysis.v1beta1.IScanConfig>
|
Returns | |
---|---|
Type | Description |
void |
listScanConfigs(request, callback)
listScanConfigs(request: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, callback: PaginationCallback<protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse | null | undefined, protos.google.devtools.containeranalysis.v1beta1.IScanConfig>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest
|
callback |
PaginationCallback<protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse | null | undefined, protos.google.devtools.containeranalysis.v1beta1.IScanConfig>
|
Returns | |
---|---|
Type | Description |
void |
listScanConfigsAsync(request, options)
listScanConfigsAsync(request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.containeranalysis.v1beta1.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 |
protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.devtools.containeranalysis.v1beta1.IScanConfig> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 name of the project to list scan configurations for in the form of
* `projects/[PROJECT_ID]`.
*/
// const parent = 'abc123'
/**
* Required. The filter expression.
*/
// const filter = 'abc123'
/**
* The number of scan configs to return in the list.
*/
// const pageSize = 1234
/**
* Token to provide to skip to a particular spot in the list.
*/
// const pageToken = 'abc123'
// Imports the Containeranalysis library
const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1;
// Instantiates a client
const containeranalysisClient = new ContainerAnalysisV1Beta1Client();
async function callListScanConfigs() {
// Construct request
const request = {
parent,
filter,
};
// Run request
const iterable = await containeranalysisClient.listScanConfigsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListScanConfigs();
listScanConfigsStream(request, options)
listScanConfigsStream(request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.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 |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromScanConfigName(scanConfigName)
matchProjectFromScanConfigName(scanConfigName: string): string | number;
Parse the project from ScanConfig resource.
Parameter | |
---|---|
Name | Description |
scanConfigName |
string
A fully-qualified path representing ScanConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchScanConfigFromScanConfigName(scanConfigName)
matchScanConfigFromScanConfigName(scanConfigName: string): string | number;
Parse the scan_config from ScanConfig resource.
Parameter | |
---|---|
Name | Description |
scanConfigName |
string
A fully-qualified path representing ScanConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the scan_config. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
scanConfigPath(project, scanConfig)
scanConfigPath(project: string, scanConfig: string): string;
Return a fully-qualified scanConfig resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
scanConfig |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
setIamPolicy(request, options)
setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.ISetIamPolicyRequest | undefined,
{} | undefined
]>;
Sets the access control policy on the specified note or occurrence. Requires containeranalysis.notes.setIamPolicy
or containeranalysis.occurrences.setIamPolicy
permission if the resource is a note or an occurrence, respectively.
The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID]
for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]
for occurrences.
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.ISetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.ISetIamPolicyRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 for which the policy is being specified.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* 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.
*/
// const policy = {}
/**
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
* the fields in the mask will be modified. If no mask is provided, the
* following default mask is used:
* `paths: "bindings, etag"`
*/
// const updateMask = {}
// Imports the Containeranalysis library
const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1;
// Instantiates a client
const containeranalysisClient = new ContainerAnalysisV1Beta1Client();
async function callSetIamPolicy() {
// Construct request
const request = {
resource,
policy,
};
// Run request
const response = await containeranalysisClient.setIamPolicy(request);
console.log(response);
}
callSetIamPolicy();
setIamPolicy(request, options, callback)
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.ISetIamPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
setIamPolicy(request, callback)
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.ISetIamPolicyRequest
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
testIamPermissions(request, options)
testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
protos.google.iam.v1.ITestIamPermissionsResponse,
protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
{} | undefined
]>;
Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, containeranalysis.notes.list
).
The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID]
for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]
for occurrences.
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.ITestIamPermissionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.iam.v1.ITestIamPermissionsResponse,
protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* 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).
*/
// const permissions = 'abc123'
// Imports the Containeranalysis library
const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1;
// Instantiates a client
const containeranalysisClient = new ContainerAnalysisV1Beta1Client();
async function callTestIamPermissions() {
// Construct request
const request = {
resource,
permissions,
};
// Run request
const response = await containeranalysisClient.testIamPermissions(request);
console.log(response);
}
callTestIamPermissions();
testIamPermissions(request, options, callback)
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.ITestIamPermissionsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
testIamPermissions(request, callback)
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.iam.v1.ITestIamPermissionsRequest
|
callback |
Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateScanConfig(request, options)
updateScanConfig(request?: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, options?: CallOptions): Promise<[
protos.google.devtools.containeranalysis.v1beta1.IScanConfig,
(protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest | undefined),
{} | undefined
]>;
Updates the specified scan configuration.
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.devtools.containeranalysis.v1beta1.IScanConfig,
(protos.google.devtools.containeranalysis.v1beta1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 name of the scan configuration in the form of
* `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
*/
// const name = 'abc123'
/**
* Required. The updated scan configuration.
*/
// const scanConfig = {}
// Imports the Containeranalysis library
const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1;
// Instantiates a client
const containeranalysisClient = new ContainerAnalysisV1Beta1Client();
async function callUpdateScanConfig() {
// Construct request
const request = {
name,
scanConfig,
};
// Run request
const response = await containeranalysisClient.updateScanConfig(request);
console.log(response);
}
callUpdateScanConfig();
updateScanConfig(request, options, callback)
updateScanConfig(request: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, options: CallOptions, callback: Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateScanConfig(request, callback)
updateScanConfig(request: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, callback: Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest
|
callback |
Callback<protos.google.devtools.containeranalysis.v1beta1.IScanConfig, protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |