googleapis
Version:
Google APIs Client Library for Node.js
972 lines (971 loc) • 205 kB
TypeScript
/// <reference types="node" />
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace securitycenter_v1beta2 {
export interface Options extends GlobalOptions {
version: 'v1beta2';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Security Command Center API
*
* Security Command Center API provides access to temporal views of assets and findings within an organization.
*
* @example
* ```js
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
* ```
*/
export class Securitycenter {
context: APIRequestContext;
folders: Resource$Folders;
organizations: Resource$Organizations;
projects: Resource$Projects;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Configuration of a module.
*/
export interface Schema$Config {
/**
* The state of enablement for the module at its level of the resource hierarchy.
*/
moduleEnablementState?: string | null;
/**
* The configuration value for the module. The absence of this field implies its inheritance from the parent.
*/
value?: {
[key: string]: any;
} | null;
}
/**
* Resource capturing the settings for the Container Threat Detection service.
*/
export interface Schema$ContainerThreatDetectionSettings {
/**
* The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.
*/
modules?: {
[key: string]: Schema$Config;
} | null;
/**
* The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
*/
name?: string | null;
/**
* Output only. The service account used by Container Threat Detection for scanning. Service accounts are scoped at the project level meaning this field will be empty at any level above a project.
*/
serviceAccount?: string | null;
/**
* The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.
*/
serviceEnablementState?: string | null;
/**
* Output only. The time the settings were last updated.
*/
updateTime?: string | null;
}
/**
* Details of a subscription.
*/
export interface Schema$Details {
/**
* The time the subscription has or will end.
*/
endTime?: string | null;
/**
* The time the subscription has or will start.
*/
startTime?: string | null;
/**
* The type of subscription
*/
type?: string | null;
}
/**
* Resource capturing the settings for the Event Threat Detection service.
*/
export interface Schema$EventThreatDetectionSettings {
/**
* The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.
*/
modules?: {
[key: string]: Schema$Config;
} | null;
/**
* The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
*/
name?: string | null;
/**
* The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.
*/
serviceEnablementState?: string | null;
/**
* Output only. The time the settings were last updated.
*/
updateTime?: string | null;
}
/**
* Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.
*/
export interface Schema$Finding {
/**
* The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION"
*/
category?: string | null;
/**
* The time at which the finding was created in Security Command Center.
*/
createTime?: string | null;
/**
* The time at which the event took place, or when an update to the finding occurred. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding were to be resolved afterward, this time would reflect when the finding was resolved.
*/
eventTime?: string | null;
/**
* The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.
*/
externalUri?: string | null;
/**
* The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}"
*/
name?: string | null;
/**
* The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: "organizations/{organization_id\}/sources/{source_id\}"
*/
parent?: string | null;
/**
* For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.
*/
resourceName?: string | null;
/**
* Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.
*/
securityMarks?: Schema$SecurityMarks;
/**
* The severity of the finding. This field is managed by the source that writes the finding.
*/
severity?: string | null;
/**
* Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.
*/
sourceProperties?: {
[key: string]: any;
} | null;
/**
* The state of the finding.
*/
state?: string | null;
}
/**
* Message that contains the resource name and display name of a folder resource.
*/
export interface Schema$Folder {
/**
* Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name
*/
resourceFolder?: string | null;
/**
* The user defined display name for this folder.
*/
resourceFolderDisplayName?: string | null;
}
/**
* Response of asset discovery run
*/
export interface Schema$GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse {
/**
* The duration between asset discovery run start and end
*/
duration?: string | null;
/**
* The state of an asset discovery run.
*/
state?: string | null;
}
/**
* Cloud SCC's Notification
*/
export interface Schema$GoogleCloudSecuritycenterV1NotificationMessage {
/**
* If it's a Finding based notification config, this field will be populated.
*/
finding?: Schema$Finding;
/**
* Name of the notification config that generated current notification.
*/
notificationConfigName?: string | null;
/**
* The Cloud resource tied to this notification's Finding.
*/
resource?: Schema$GoogleCloudSecuritycenterV1Resource;
}
/**
* Security Command Center finding. A finding is a record of assessment data (security, risk, health or privacy) ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, an XSS vulnerability in an App Engine application is a finding.
*/
export interface Schema$GoogleCloudSecuritycenterV1p1beta1Finding {
/**
* The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION"
*/
category?: string | null;
/**
* The time at which the finding was created in Security Command Center.
*/
createTime?: string | null;
/**
* The time at which the event took place, or when an update to the finding occurred. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding were to be resolved afterward, this time would reflect when the finding was resolved.
*/
eventTime?: string | null;
/**
* The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.
*/
externalUri?: string | null;
/**
* The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}"
*/
name?: string | null;
/**
* The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: "organizations/{organization_id\}/sources/{source_id\}"
*/
parent?: string | null;
/**
* For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.
*/
resourceName?: string | null;
/**
* Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.
*/
securityMarks?: Schema$GoogleCloudSecuritycenterV1p1beta1SecurityMarks;
/**
* The severity of the finding. This field is managed by the source that writes the finding.
*/
severity?: string | null;
/**
* Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.
*/
sourceProperties?: {
[key: string]: any;
} | null;
/**
* The state of the finding.
*/
state?: string | null;
}
/**
* Message that contains the resource name and display name of a folder resource.
*/
export interface Schema$GoogleCloudSecuritycenterV1p1beta1Folder {
/**
* Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name
*/
resourceFolder?: string | null;
/**
* The user defined display name for this folder.
*/
resourceFolderDisplayName?: string | null;
}
/**
* Security Command Center's Notification
*/
export interface Schema$GoogleCloudSecuritycenterV1p1beta1NotificationMessage {
/**
* If it's a Finding based notification config, this field will be populated.
*/
finding?: Schema$GoogleCloudSecuritycenterV1p1beta1Finding;
/**
* Name of the notification config that generated current notification.
*/
notificationConfigName?: string | null;
/**
* The Cloud resource tied to the notification.
*/
resource?: Schema$GoogleCloudSecuritycenterV1p1beta1Resource;
}
/**
* Information related to the Google Cloud resource.
*/
export interface Schema$GoogleCloudSecuritycenterV1p1beta1Resource {
/**
* Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.
*/
folders?: Schema$GoogleCloudSecuritycenterV1p1beta1Folder[];
/**
* The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name
*/
name?: string | null;
/**
* The full resource name of resource's parent.
*/
parent?: string | null;
/**
* The human readable name of resource's parent.
*/
parentDisplayName?: string | null;
/**
* The full resource name of project that the resource belongs to.
*/
project?: string | null;
/**
* The human readable name of project that the resource belongs to.
*/
projectDisplayName?: string | null;
}
/**
* Response of asset discovery run
*/
export interface Schema$GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse {
/**
* The duration between asset discovery run start and end
*/
duration?: string | null;
/**
* The state of an asset discovery run.
*/
state?: string | null;
}
/**
* User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.
*/
export interface Schema$GoogleCloudSecuritycenterV1p1beta1SecurityMarks {
/**
* Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)
*/
marks?: {
[key: string]: string;
} | null;
/**
* The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id\}/assets/{asset_id\}/securityMarks" "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}/securityMarks".
*/
name?: string | null;
}
/**
* Information related to the Google Cloud resource.
*/
export interface Schema$GoogleCloudSecuritycenterV1Resource {
/**
* Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.
*/
folders?: Schema$Folder[];
/**
* The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name
*/
name?: string | null;
/**
* The full resource name of resource's parent.
*/
parent?: string | null;
/**
* The human readable name of resource's parent.
*/
parentDisplayName?: string | null;
/**
* The full resource name of project that the resource belongs to.
*/
project?: string | null;
/**
* The human readable name of project that the resource belongs to.
*/
projectDisplayName?: string | null;
}
/**
* Response of asset discovery run
*/
export interface Schema$GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse {
/**
* The duration between asset discovery run start and end
*/
duration?: string | null;
/**
* The state of an asset discovery run.
*/
state?: string | null;
}
/**
* Resource capturing the settings for Security Center.
*/
export interface Schema$SecurityCenterSettings {
/**
* The resource name of the project to send logs to. This project must be part of the organization this resource resides in. The format is `projects/{project_id\}`. An empty value disables logging. This value is only referenced by services that support log sink. Please refer to the documentation for an updated list of compatible services.
*/
logSinkProject?: string | null;
/**
* The resource name of the SecurityCenterSettings. Format: organizations/{organization\}/securityCenterSettings
*/
name?: string | null;
/**
* The organization level service account to be used for security center components.
*/
orgServiceAccount?: string | null;
}
/**
* Resource capturing the settings for the Security Health Analytics service.
*/
export interface Schema$SecurityHealthAnalyticsSettings {
/**
* The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.
*/
modules?: {
[key: string]: Schema$Config;
} | null;
/**
* The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
*/
name?: string | null;
/**
* Output only. The service account used by Security Health Analytics detectors.
*/
serviceAccount?: string | null;
/**
* The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.
*/
serviceEnablementState?: string | null;
/**
* Output only. The time the settings were last updated.
*/
updateTime?: string | null;
}
/**
* User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.
*/
export interface Schema$SecurityMarks {
/**
* Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)
*/
marks?: {
[key: string]: string;
} | null;
/**
* The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id\}/assets/{asset_id\}/securityMarks" "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}/securityMarks".
*/
name?: string | null;
}
/**
* Resource capturing the state of an organization's subscription.
*/
export interface Schema$Subscription {
/**
* The details of the most recent active subscription. If there has never been a subscription this will be empty.
*/
details?: Schema$Details;
/**
* The resource name of the subscription. Format: organizations/{organization\}/subscription
*/
name?: string | null;
/**
* The tier of SCC features this organization currently has access to.
*/
tier?: string | null;
}
/**
* Resource capturing the settings for the Web Security Scanner service.
*/
export interface Schema$WebSecurityScannerSettings {
/**
* The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.
*/
modules?: {
[key: string]: Schema$Config;
} | null;
/**
* The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
*/
name?: string | null;
/**
* The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.
*/
serviceEnablementState?: string | null;
/**
* Output only. The time the settings were last updated.
*/
updateTime?: string | null;
}
export class Resource$Folders {
context: APIRequestContext;
containerThreatDetectionSettings: Resource$Folders$Containerthreatdetectionsettings;
eventThreatDetectionSettings: Resource$Folders$Eventthreatdetectionsettings;
securityHealthAnalyticsSettings: Resource$Folders$Securityhealthanalyticssettings;
webSecurityScannerSettings: Resource$Folders$Websecurityscannersettings;
constructor(context: APIRequestContext);
/**
* Get the ContainerThreatDetectionSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.getContainerThreatDetectionSettings({
* // Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
* name: 'folders/my-folder/containerThreatDetectionSettings',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceAccount": "my_serviceAccount",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
getContainerThreatDetectionSettings(params: Params$Resource$Folders$Getcontainerthreatdetectionsettings, options: StreamMethodOptions): GaxiosPromise<Readable>;
getContainerThreatDetectionSettings(params?: Params$Resource$Folders$Getcontainerthreatdetectionsettings, options?: MethodOptions): GaxiosPromise<Schema$ContainerThreatDetectionSettings>;
getContainerThreatDetectionSettings(params: Params$Resource$Folders$Getcontainerthreatdetectionsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
getContainerThreatDetectionSettings(params: Params$Resource$Folders$Getcontainerthreatdetectionsettings, options: MethodOptions | BodyResponseCallback<Schema$ContainerThreatDetectionSettings>, callback: BodyResponseCallback<Schema$ContainerThreatDetectionSettings>): void;
getContainerThreatDetectionSettings(params: Params$Resource$Folders$Getcontainerthreatdetectionsettings, callback: BodyResponseCallback<Schema$ContainerThreatDetectionSettings>): void;
getContainerThreatDetectionSettings(callback: BodyResponseCallback<Schema$ContainerThreatDetectionSettings>): void;
/**
* Get the EventThreatDetectionSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.getEventThreatDetectionSettings({
* // Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
* name: 'folders/my-folder/eventThreatDetectionSettings',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
getEventThreatDetectionSettings(params: Params$Resource$Folders$Geteventthreatdetectionsettings, options: StreamMethodOptions): GaxiosPromise<Readable>;
getEventThreatDetectionSettings(params?: Params$Resource$Folders$Geteventthreatdetectionsettings, options?: MethodOptions): GaxiosPromise<Schema$EventThreatDetectionSettings>;
getEventThreatDetectionSettings(params: Params$Resource$Folders$Geteventthreatdetectionsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
getEventThreatDetectionSettings(params: Params$Resource$Folders$Geteventthreatdetectionsettings, options: MethodOptions | BodyResponseCallback<Schema$EventThreatDetectionSettings>, callback: BodyResponseCallback<Schema$EventThreatDetectionSettings>): void;
getEventThreatDetectionSettings(params: Params$Resource$Folders$Geteventthreatdetectionsettings, callback: BodyResponseCallback<Schema$EventThreatDetectionSettings>): void;
getEventThreatDetectionSettings(callback: BodyResponseCallback<Schema$EventThreatDetectionSettings>): void;
/**
* Get the SecurityHealthAnalyticsSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.getSecurityHealthAnalyticsSettings({
* // Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
* name: 'folders/my-folder/securityHealthAnalyticsSettings',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceAccount": "my_serviceAccount",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
getSecurityHealthAnalyticsSettings(params: Params$Resource$Folders$Getsecurityhealthanalyticssettings, options: StreamMethodOptions): GaxiosPromise<Readable>;
getSecurityHealthAnalyticsSettings(params?: Params$Resource$Folders$Getsecurityhealthanalyticssettings, options?: MethodOptions): GaxiosPromise<Schema$SecurityHealthAnalyticsSettings>;
getSecurityHealthAnalyticsSettings(params: Params$Resource$Folders$Getsecurityhealthanalyticssettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
getSecurityHealthAnalyticsSettings(params: Params$Resource$Folders$Getsecurityhealthanalyticssettings, options: MethodOptions | BodyResponseCallback<Schema$SecurityHealthAnalyticsSettings>, callback: BodyResponseCallback<Schema$SecurityHealthAnalyticsSettings>): void;
getSecurityHealthAnalyticsSettings(params: Params$Resource$Folders$Getsecurityhealthanalyticssettings, callback: BodyResponseCallback<Schema$SecurityHealthAnalyticsSettings>): void;
getSecurityHealthAnalyticsSettings(callback: BodyResponseCallback<Schema$SecurityHealthAnalyticsSettings>): void;
/**
* Get the WebSecurityScannerSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.getWebSecurityScannerSettings({
* // Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
* name: 'folders/my-folder/webSecurityScannerSettings',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
getWebSecurityScannerSettings(params: Params$Resource$Folders$Getwebsecurityscannersettings, options: StreamMethodOptions): GaxiosPromise<Readable>;
getWebSecurityScannerSettings(params?: Params$Resource$Folders$Getwebsecurityscannersettings, options?: MethodOptions): GaxiosPromise<Schema$WebSecurityScannerSettings>;
getWebSecurityScannerSettings(params: Params$Resource$Folders$Getwebsecurityscannersettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
getWebSecurityScannerSettings(params: Params$Resource$Folders$Getwebsecurityscannersettings, options: MethodOptions | BodyResponseCallback<Schema$WebSecurityScannerSettings>, callback: BodyResponseCallback<Schema$WebSecurityScannerSettings>): void;
getWebSecurityScannerSettings(params: Params$Resource$Folders$Getwebsecurityscannersettings, callback: BodyResponseCallback<Schema$WebSecurityScannerSettings>): void;
getWebSecurityScannerSettings(callback: BodyResponseCallback<Schema$WebSecurityScannerSettings>): void;
/**
* Update the ContainerThreatDetectionSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.updateContainerThreatDetectionSettings(
* {
* // The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
* name: 'folders/my-folder/containerThreatDetectionSettings',
* // The list of fields to be updated.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceAccount": "my_serviceAccount",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* },
* }
* );
* console.log(res.data);
*
* // Example response
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceAccount": "my_serviceAccount",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
updateContainerThreatDetectionSettings(params: Params$Resource$Folders$Updatecontainerthreatdetectionsettings, options: StreamMethodOptions): GaxiosPromise<Readable>;
updateContainerThreatDetectionSettings(params?: Params$Resource$Folders$Updatecontainerthreatdetectionsettings, options?: MethodOptions): GaxiosPromise<Schema$ContainerThreatDetectionSettings>;
updateContainerThreatDetectionSettings(params: Params$Resource$Folders$Updatecontainerthreatdetectionsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
updateContainerThreatDetectionSettings(params: Params$Resource$Folders$Updatecontainerthreatdetectionsettings, options: MethodOptions | BodyResponseCallback<Schema$ContainerThreatDetectionSettings>, callback: BodyResponseCallback<Schema$ContainerThreatDetectionSettings>): void;
updateContainerThreatDetectionSettings(params: Params$Resource$Folders$Updatecontainerthreatdetectionsettings, callback: BodyResponseCallback<Schema$ContainerThreatDetectionSettings>): void;
updateContainerThreatDetectionSettings(callback: BodyResponseCallback<Schema$ContainerThreatDetectionSettings>): void;
/**
* Update the EventThreatDetectionSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.updateEventThreatDetectionSettings({
* // The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
* name: 'folders/my-folder/eventThreatDetectionSettings',
* // The list of fields to be updated.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
updateEventThreatDetectionSettings(params: Params$Resource$Folders$Updateeventthreatdetectionsettings, options: StreamMethodOptions): GaxiosPromise<Readable>;
updateEventThreatDetectionSettings(params?: Params$Resource$Folders$Updateeventthreatdetectionsettings, options?: MethodOptions): GaxiosPromise<Schema$EventThreatDetectionSettings>;
updateEventThreatDetectionSettings(params: Params$Resource$Folders$Updateeventthreatdetectionsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
updateEventThreatDetectionSettings(params: Params$Resource$Folders$Updateeventthreatdetectionsettings, options: MethodOptions | BodyResponseCallback<Schema$EventThreatDetectionSettings>, callback: BodyResponseCallback<Schema$EventThreatDetectionSettings>): void;
updateEventThreatDetectionSettings(params: Params$Resource$Folders$Updateeventthreatdetectionsettings, callback: BodyResponseCallback<Schema$EventThreatDetectionSettings>): void;
updateEventThreatDetectionSettings(callback: BodyResponseCallback<Schema$EventThreatDetectionSettings>): void;
/**
* Update the SecurityHealthAnalyticsSettings resource.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const securitycenter = google.securitycenter('v1beta2');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await securitycenter.folders.updateSecurityHealthAnalyticsSettings(
* {
* // The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
* name: 'folders/my-folder/securityHealthAnalyticsSettings',
* // The list of fields to be updated.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "modules": {},
* // "name": "my_name",
* // "serviceAccount": "my_serviceAccount",
* // "serviceEnablementState": "my_serviceEnablementState",
* // "updateTime": "my_updateTime"
* // }
* },
* }
* );
* console.log(res.data);
*