// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Security Command Center API Client for Deno * =========================================== * * Security Command Center API provides access to temporal views of assets and findings within an organization. * * Docs: https://cloud.google.com/security-command-center * Source: https://googleapis.deno.dev/v1/securitycenter:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * Security Command Center API provides access to temporal views of assets and * findings within an organization. */ export class SecurityCenter { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://securitycenter.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Filters an organization's assets and groups them by their specified * properties. * * @param parent Required. The name of the parent to group the assets by. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async foldersAssetsGroup(parent: string, req: GroupAssetsRequest): Promise { req = serializeGroupAssetsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/assets:group`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGroupAssetsResponse(data); } /** * Lists an organization's assets. * * @param parent Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async foldersAssetsList(parent: string, opts: FoldersAssetsListOptions = {}): Promise { opts = serializeFoldersAssetsListOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/assets`); if (opts.compareDuration !== undefined) { url.searchParams.append("compareDuration", String(opts.compareDuration)); } if (opts.fieldMask !== undefined) { url.searchParams.append("fieldMask", String(opts.fieldMask)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.readTime !== undefined) { url.searchParams.append("readTime", String(opts.readTime)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListAssetsResponse(data); } /** * Updates security marks. * * @param name 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". */ async foldersAssetsUpdateSecurityMarks(name: string, req: SecurityMarks, opts: FoldersAssetsUpdateSecurityMarksOptions = {}): Promise { opts = serializeFoldersAssetsUpdateSecurityMarksOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.startTime !== undefined) { url.searchParams.append("startTime", String(opts.startTime)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as SecurityMarks; } /** * Creates a BigQuery export. * * @param parent Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async foldersBigQueryExportsCreate(parent: string, req: GoogleCloudSecuritycenterV1BigQueryExport, opts: FoldersBigQueryExportsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bigQueryExports`); if (opts.bigQueryExportId !== undefined) { url.searchParams.append("bigQueryExportId", String(opts.bigQueryExportId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Deletes an existing BigQuery export. * * @param name Required. The name of the BigQuery export to delete. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}` */ async foldersBigQueryExportsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a BigQuery export. * * @param name Required. Name of the BigQuery export to retrieve. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}` */ async foldersBigQueryExportsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Lists BigQuery exports. Note that when requesting BigQuery exports at a * given level all exports under that level are also returned e.g. if * requesting BigQuery exports under a folder, then all BigQuery exports * immediately under the folder plus the ones created under the projects * within the folder are returned. * * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async foldersBigQueryExportsList(parent: string, opts: FoldersBigQueryExportsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bigQueryExports`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBigQueryExportsResponse; } /** * Updates a BigQuery export. * * @param name The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is ignored when provided in create requests. */ async foldersBigQueryExportsPatch(name: string, req: GoogleCloudSecuritycenterV1BigQueryExport, opts: FoldersBigQueryExportsPatchOptions = {}): Promise { opts = serializeFoldersBigQueryExportsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Creates a resident Event Threat Detection custom module at the scope of * the given Resource Manager parent, and also creates inherited custom * modules for all descendants of the given parent. These modules are enabled * by default. * * @param parent Required. The new custom module's parent. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async foldersEventThreatDetectionSettingsCustomModulesCreate(parent: string, req: EventThreatDetectionCustomModule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as EventThreatDetectionCustomModule; } /** * Deletes the specified Event Threat Detection custom module and all of its * descendants in the Resource Manager hierarchy. This method is only * supported for resident custom modules. * * @param name Required. Name of the custom module to delete. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async foldersEventThreatDetectionSettingsCustomModulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets an Event Threat Detection custom module. * * @param name Required. Name of the custom module to get. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async foldersEventThreatDetectionSettingsCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as EventThreatDetectionCustomModule; } /** * Lists all Event Threat Detection custom modules for the given Resource * Manager parent. This includes resident modules defined at the scope of the * parent along with modules inherited from ancestors. * * @param parent Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async foldersEventThreatDetectionSettingsCustomModulesList(parent: string, opts: FoldersEventThreatDetectionSettingsCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEventThreatDetectionCustomModulesResponse; } /** * Lists all resident Event Threat Detection custom modules under the given * Resource Manager parent and its descendants. * * @param parent Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async foldersEventThreatDetectionSettingsCustomModulesListDescendant(parent: string, opts: FoldersEventThreatDetectionSettingsCustomModulesListDescendantOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:listDescendant`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDescendantEventThreatDetectionCustomModulesResponse; } /** * Updates the Event Threat Detection custom module with the given name based * on the given update mask. Updating the enablement state is supported for * both resident and inherited modules (though resident modules cannot have an * enablement state of "inherited"). Updating the display name or * configuration of a module is supported for resident modules only. The type * of a module cannot be changed. * * @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async foldersEventThreatDetectionSettingsCustomModulesPatch(name: string, req: EventThreatDetectionCustomModule, opts: FoldersEventThreatDetectionSettingsCustomModulesPatchOptions = {}): Promise { opts = serializeFoldersEventThreatDetectionSettingsCustomModulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as EventThreatDetectionCustomModule; } /** * Gets an effective Event Threat Detection custom module at the given level. * * @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. */ async foldersEventThreatDetectionSettingsEffectiveCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as EffectiveEventThreatDetectionCustomModule; } /** * Lists all effective Event Threat Detection custom modules for the given * parent. This includes resident modules defined at the scope of the parent * along with modules inherited from its ancestors. * * @param parent Required. Name of the parent to list custom modules for. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async foldersEventThreatDetectionSettingsEffectiveCustomModulesList(parent: string, opts: FoldersEventThreatDetectionSettingsEffectiveCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/effectiveCustomModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEffectiveEventThreatDetectionCustomModulesResponse; } /** * Validates the given Event Threat Detection custom module. * * @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async foldersEventThreatDetectionSettingsValidateCustomModule(parent: string, req: ValidateEventThreatDetectionCustomModuleRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:validateCustomModule`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ValidateEventThreatDetectionCustomModuleResponse; } /** * Kicks off an LRO to bulk mute findings for a parent based on a filter. The * parent can be either an organization, folder or project. The findings * matched by the filter will be muted after the LRO is done. * * @param parent Required. The parent, at which bulk action needs to be applied. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async foldersFindingsBulkMute(parent: string, req: BulkMuteFindingsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/findings:bulkMute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes an existing mute config. * * @param name Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async foldersLocationsMuteConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a mute config. * * @param name Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async foldersLocationsMuteConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Updates a mute config. * * @param name This field will be ignored if provided on config creation. Format `organizations/{organization}/muteConfigs/{mute_config}` `folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}` `organizations/{organization}/locations/global/muteConfigs/{mute_config}` `folders/{folder}/locations/global/muteConfigs/{mute_config}` `projects/{project}/locations/global/muteConfigs/{mute_config}` */ async foldersLocationsMuteConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: FoldersLocationsMuteConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); opts = serializeFoldersLocationsMuteConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Creates a mute config. * * @param parent Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async foldersMuteConfigsCreate(parent: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: FoldersMuteConfigsCreateOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/muteConfigs`); if (opts.muteConfigId !== undefined) { url.searchParams.append("muteConfigId", String(opts.muteConfigId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Deletes an existing mute config. * * @param name Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async foldersMuteConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a mute config. * * @param name Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async foldersMuteConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Lists mute configs. * * @param parent Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async foldersMuteConfigsList(parent: string, opts: FoldersMuteConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/muteConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListMuteConfigsResponse(data); } /** * Updates a mute config. * * @param name This field will be ignored if provided on config creation. Format `organizations/{organization}/muteConfigs/{mute_config}` `folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}` `organizations/{organization}/locations/global/muteConfigs/{mute_config}` `folders/{folder}/locations/global/muteConfigs/{mute_config}` `projects/{project}/locations/global/muteConfigs/{mute_config}` */ async foldersMuteConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: FoldersMuteConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); opts = serializeFoldersMuteConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Creates a notification config. * * @param parent Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async foldersNotificationConfigsCreate(parent: string, req: NotificationConfig, opts: FoldersNotificationConfigsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/notificationConfigs`); if (opts.configId !== undefined) { url.searchParams.append("configId", String(opts.configId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as NotificationConfig; } /** * Deletes a notification config. * * @param name Required. Name of the notification config to delete. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`. */ async foldersNotificationConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a notification config. * * @param name Required. Name of the notification config to get. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`. */ async foldersNotificationConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as NotificationConfig; } /** * Lists notification configs. * * @param parent Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". */ async foldersNotificationConfigsList(parent: string, opts: FoldersNotificationConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/notificationConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListNotificationConfigsResponse; } /** * Updates a notification config. The following update fields are allowed: * description, pubsub_topic, streaming_config.filter * * @param name The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". */ async foldersNotificationConfigsPatch(name: string, req: NotificationConfig, opts: FoldersNotificationConfigsPatchOptions = {}): Promise { opts = serializeFoldersNotificationConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as NotificationConfig; } /** * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the * given CRM parent, and also creates inherited * SecurityHealthAnalyticsCustomModules for all CRM descendants of the given * parent. These modules are enabled by default. * * @param parent Required. Resource name of the new custom module's parent. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async foldersSecurityHealthAnalyticsSettingsCustomModulesCreate(parent: string, req: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its * descendants in the CRM hierarchy. This method is only supported for * resident custom modules. * * @param name Required. Name of the custom module to delete. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ async foldersSecurityHealthAnalyticsSettingsCustomModulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Retrieves a SecurityHealthAnalyticsCustomModule. * * @param name Required. Name of the custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ async foldersSecurityHealthAnalyticsSettingsCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Returns a list of all SecurityHealthAnalyticsCustomModules for the given * parent. This includes resident modules defined at the scope of the parent, * and inherited modules, inherited from CRM ancestors. * * @param parent Required. Name of parent to list custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async foldersSecurityHealthAnalyticsSettingsCustomModulesList(parent: string, opts: FoldersSecurityHealthAnalyticsSettingsCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSecurityHealthAnalyticsCustomModulesResponse; } /** * Returns a list of all resident SecurityHealthAnalyticsCustomModules under * the given CRM parent and all of the parent’s CRM descendants. * * @param parent Required. Name of parent to list descendant custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async foldersSecurityHealthAnalyticsSettingsCustomModulesListDescendant(parent: string, opts: FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:listDescendant`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDescendantSecurityHealthAnalyticsCustomModulesResponse; } /** * Updates the SecurityHealthAnalyticsCustomModule under the given name based * on the given update mask. Updating the enablement state is supported on * both resident and inherited modules (though resident modules cannot have an * enablement state of "inherited"). Updating the display name and custom * config of a module is supported on resident modules only. * * @param name Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. */ async foldersSecurityHealthAnalyticsSettingsCustomModulesPatch(name: string, req: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, opts: FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions = {}): Promise { opts = serializeFoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. * * @param parent Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}` */ async foldersSecurityHealthAnalyticsSettingsCustomModulesSimulate(parent: string, req: SimulateSecurityHealthAnalyticsCustomModuleRequest): Promise { req = serializeSimulateSecurityHealthAnalyticsCustomModuleRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:simulate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeSimulateSecurityHealthAnalyticsCustomModuleResponse(data); } /** * Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. * * @param name Required. Name of the effective custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` */ async foldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule; } /** * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for * the given parent. This includes resident modules defined at the scope of * the parent, and inherited modules, inherited from CRM ancestors. * * @param parent Required. Name of parent to list effective custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async foldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesList(parent: string, opts: FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/effectiveCustomModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; } /** * Updates external system. This is for a given finding. * * @param name Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" */ async foldersSourcesFindingsExternalSystemsPatch(name: string, req: GoogleCloudSecuritycenterV1ExternalSystem, opts: FoldersSourcesFindingsExternalSystemsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1ExternalSystem(req); opts = serializeFoldersSourcesFindingsExternalSystemsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1ExternalSystem(data); } /** * Filters an organization or source's findings and groups them by their * specified properties. To group across all sources provide a `-` as the * source id. Example: /v1/organizations/{organization_id}/sources/-/findings, * /v1/folders/{folder_id}/sources/-/findings, * /v1/projects/{project_id}/sources/-/findings * * @param parent Required. Name of the source to groupBy. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-` */ async foldersSourcesFindingsGroup(parent: string, req: GroupFindingsRequest): Promise { req = serializeGroupFindingsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings:group`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGroupFindingsResponse(data); } /** * Lists an organization or source's findings. To list across all sources * provide a `-` as the source id. Example: * /v1/organizations/{organization_id}/sources/-/findings * * @param parent Required. Name of the source the findings belong to. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To list across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` */ async foldersSourcesFindingsList(parent: string, opts: FoldersSourcesFindingsListOptions = {}): Promise { opts = serializeFoldersSourcesFindingsListOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings`); if (opts.compareDuration !== undefined) { url.searchParams.append("compareDuration", String(opts.compareDuration)); } if (opts.fieldMask !== undefined) { url.searchParams.append("fieldMask", String(opts.fieldMask)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.readTime !== undefined) { url.searchParams.append("readTime", String(opts.readTime)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListFindingsResponse(data); } /** * Creates or updates a finding. The corresponding source must exist for a * finding creation to succeed. * * @param name The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". */ async foldersSourcesFindingsPatch(name: string, req: Finding, opts: FoldersSourcesFindingsPatchOptions = {}): Promise { req = serializeFinding(req); opts = serializeFoldersSourcesFindingsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeFinding(data); } /** * Updates the mute state of a finding. * * @param name Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ async foldersSourcesFindingsSetMute(name: string, req: SetMuteRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:setMute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates the state of a finding. * * @param name Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ async foldersSourcesFindingsSetState(name: string, req: SetFindingStateRequest): Promise { req = serializeSetFindingStateRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:setState`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates security marks. * * @param name 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". */ async foldersSourcesFindingsUpdateSecurityMarks(name: string, req: SecurityMarks, opts: FoldersSourcesFindingsUpdateSecurityMarksOptions = {}): Promise { opts = serializeFoldersSourcesFindingsUpdateSecurityMarksOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.startTime !== undefined) { url.searchParams.append("startTime", String(opts.startTime)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as SecurityMarks; } /** * Lists all sources belonging to an organization. * * @param parent Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async foldersSourcesList(parent: string, opts: FoldersSourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sources`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSourcesResponse; } /** * Filters an organization's assets and groups them by their specified * properties. * * @param parent Required. The name of the parent to group the assets by. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async organizationsAssetsGroup(parent: string, req: GroupAssetsRequest): Promise { req = serializeGroupAssetsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/assets:group`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGroupAssetsResponse(data); } /** * Lists an organization's assets. * * @param parent Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async organizationsAssetsList(parent: string, opts: OrganizationsAssetsListOptions = {}): Promise { opts = serializeOrganizationsAssetsListOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/assets`); if (opts.compareDuration !== undefined) { url.searchParams.append("compareDuration", String(opts.compareDuration)); } if (opts.fieldMask !== undefined) { url.searchParams.append("fieldMask", String(opts.fieldMask)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.readTime !== undefined) { url.searchParams.append("readTime", String(opts.readTime)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListAssetsResponse(data); } /** * Runs asset discovery. The discovery is tracked with a long-running * operation. This API can only be called with limited frequency for an * organization. If it is called too frequently the caller will receive a * TOO_MANY_REQUESTS error. * * @param parent Required. Name of the organization to run asset discovery for. Its format is `organizations/[organization_id]`. */ async organizationsAssetsRunDiscovery(parent: string, req: RunAssetDiscoveryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/assets:runDiscovery`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Updates security marks. * * @param name 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". */ async organizationsAssetsUpdateSecurityMarks(name: string, req: SecurityMarks, opts: OrganizationsAssetsUpdateSecurityMarksOptions = {}): Promise { opts = serializeOrganizationsAssetsUpdateSecurityMarksOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.startTime !== undefined) { url.searchParams.append("startTime", String(opts.startTime)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as SecurityMarks; } /** * Creates a BigQuery export. * * @param parent Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async organizationsBigQueryExportsCreate(parent: string, req: GoogleCloudSecuritycenterV1BigQueryExport, opts: OrganizationsBigQueryExportsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bigQueryExports`); if (opts.bigQueryExportId !== undefined) { url.searchParams.append("bigQueryExportId", String(opts.bigQueryExportId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Deletes an existing BigQuery export. * * @param name Required. The name of the BigQuery export to delete. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}` */ async organizationsBigQueryExportsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a BigQuery export. * * @param name Required. Name of the BigQuery export to retrieve. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}` */ async organizationsBigQueryExportsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Lists BigQuery exports. Note that when requesting BigQuery exports at a * given level all exports under that level are also returned e.g. if * requesting BigQuery exports under a folder, then all BigQuery exports * immediately under the folder plus the ones created under the projects * within the folder are returned. * * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async organizationsBigQueryExportsList(parent: string, opts: OrganizationsBigQueryExportsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bigQueryExports`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBigQueryExportsResponse; } /** * Updates a BigQuery export. * * @param name The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is ignored when provided in create requests. */ async organizationsBigQueryExportsPatch(name: string, req: GoogleCloudSecuritycenterV1BigQueryExport, opts: OrganizationsBigQueryExportsPatchOptions = {}): Promise { opts = serializeOrganizationsBigQueryExportsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Creates a resident Event Threat Detection custom module at the scope of * the given Resource Manager parent, and also creates inherited custom * modules for all descendants of the given parent. These modules are enabled * by default. * * @param parent Required. The new custom module's parent. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async organizationsEventThreatDetectionSettingsCustomModulesCreate(parent: string, req: EventThreatDetectionCustomModule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as EventThreatDetectionCustomModule; } /** * Deletes the specified Event Threat Detection custom module and all of its * descendants in the Resource Manager hierarchy. This method is only * supported for resident custom modules. * * @param name Required. Name of the custom module to delete. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async organizationsEventThreatDetectionSettingsCustomModulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets an Event Threat Detection custom module. * * @param name Required. Name of the custom module to get. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async organizationsEventThreatDetectionSettingsCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as EventThreatDetectionCustomModule; } /** * Lists all Event Threat Detection custom modules for the given Resource * Manager parent. This includes resident modules defined at the scope of the * parent along with modules inherited from ancestors. * * @param parent Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async organizationsEventThreatDetectionSettingsCustomModulesList(parent: string, opts: OrganizationsEventThreatDetectionSettingsCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEventThreatDetectionCustomModulesResponse; } /** * Lists all resident Event Threat Detection custom modules under the given * Resource Manager parent and its descendants. * * @param parent Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async organizationsEventThreatDetectionSettingsCustomModulesListDescendant(parent: string, opts: OrganizationsEventThreatDetectionSettingsCustomModulesListDescendantOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:listDescendant`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDescendantEventThreatDetectionCustomModulesResponse; } /** * Updates the Event Threat Detection custom module with the given name based * on the given update mask. Updating the enablement state is supported for * both resident and inherited modules (though resident modules cannot have an * enablement state of "inherited"). Updating the display name or * configuration of a module is supported for resident modules only. The type * of a module cannot be changed. * * @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async organizationsEventThreatDetectionSettingsCustomModulesPatch(name: string, req: EventThreatDetectionCustomModule, opts: OrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions = {}): Promise { opts = serializeOrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as EventThreatDetectionCustomModule; } /** * Gets an effective Event Threat Detection custom module at the given level. * * @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. */ async organizationsEventThreatDetectionSettingsEffectiveCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as EffectiveEventThreatDetectionCustomModule; } /** * Lists all effective Event Threat Detection custom modules for the given * parent. This includes resident modules defined at the scope of the parent * along with modules inherited from its ancestors. * * @param parent Required. Name of the parent to list custom modules for. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async organizationsEventThreatDetectionSettingsEffectiveCustomModulesList(parent: string, opts: OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/effectiveCustomModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEffectiveEventThreatDetectionCustomModulesResponse; } /** * Validates the given Event Threat Detection custom module. * * @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async organizationsEventThreatDetectionSettingsValidateCustomModule(parent: string, req: ValidateEventThreatDetectionCustomModuleRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:validateCustomModule`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ValidateEventThreatDetectionCustomModuleResponse; } /** * Kicks off an LRO to bulk mute findings for a parent based on a filter. The * parent can be either an organization, folder or project. The findings * matched by the filter will be muted after the LRO is done. * * @param parent Required. The parent, at which bulk action needs to be applied. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async organizationsFindingsBulkMute(parent: string, req: BulkMuteFindingsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/findings:bulkMute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets the settings for an organization. * * @param name Required. Name of the organization to get organization settings for. Its format is `organizations/[organization_id]/organizationSettings`. */ async organizationsGetOrganizationSettings(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as OrganizationSettings; } /** * Deletes an existing mute config. * * @param name Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async organizationsLocationsMuteConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a mute config. * * @param name Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async organizationsLocationsMuteConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Updates a mute config. * * @param name This field will be ignored if provided on config creation. Format `organizations/{organization}/muteConfigs/{mute_config}` `folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}` `organizations/{organization}/locations/global/muteConfigs/{mute_config}` `folders/{folder}/locations/global/muteConfigs/{mute_config}` `projects/{project}/locations/global/muteConfigs/{mute_config}` */ async organizationsLocationsMuteConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: OrganizationsLocationsMuteConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); opts = serializeOrganizationsLocationsMuteConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Creates a mute config. * * @param parent Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async organizationsMuteConfigsCreate(parent: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: OrganizationsMuteConfigsCreateOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/muteConfigs`); if (opts.muteConfigId !== undefined) { url.searchParams.append("muteConfigId", String(opts.muteConfigId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Deletes an existing mute config. * * @param name Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async organizationsMuteConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a mute config. * * @param name Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async organizationsMuteConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Lists mute configs. * * @param parent Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async organizationsMuteConfigsList(parent: string, opts: OrganizationsMuteConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/muteConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListMuteConfigsResponse(data); } /** * Updates a mute config. * * @param name This field will be ignored if provided on config creation. Format `organizations/{organization}/muteConfigs/{mute_config}` `folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}` `organizations/{organization}/locations/global/muteConfigs/{mute_config}` `folders/{folder}/locations/global/muteConfigs/{mute_config}` `projects/{project}/locations/global/muteConfigs/{mute_config}` */ async organizationsMuteConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: OrganizationsMuteConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); opts = serializeOrganizationsMuteConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Creates a notification config. * * @param parent Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async organizationsNotificationConfigsCreate(parent: string, req: NotificationConfig, opts: OrganizationsNotificationConfigsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/notificationConfigs`); if (opts.configId !== undefined) { url.searchParams.append("configId", String(opts.configId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as NotificationConfig; } /** * Deletes a notification config. * * @param name Required. Name of the notification config to delete. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`. */ async organizationsNotificationConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a notification config. * * @param name Required. Name of the notification config to get. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`. */ async organizationsNotificationConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as NotificationConfig; } /** * Lists notification configs. * * @param parent Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". */ async organizationsNotificationConfigsList(parent: string, opts: OrganizationsNotificationConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/notificationConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListNotificationConfigsResponse; } /** * Updates a notification config. The following update fields are allowed: * description, pubsub_topic, streaming_config.filter * * @param name The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". */ async organizationsNotificationConfigsPatch(name: string, req: NotificationConfig, opts: OrganizationsNotificationConfigsPatchOptions = {}): Promise { opts = serializeOrganizationsNotificationConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as NotificationConfig; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async organizationsOperationsCancel(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const data = await request(url.href, { client: this.#client, method: "POST", }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async organizationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async organizationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async organizationsOperationsList(name: string, opts: OrganizationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Creates a ResourceValueConfig for an organization. Maps user's tags to * difference resource values for use by the attack path simulation. * * @param parent Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field. */ async organizationsResourceValueConfigsBatchCreate(parent: string, req: BatchCreateResourceValueConfigsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/resourceValueConfigs:batchCreate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as BatchCreateResourceValueConfigsResponse; } /** * Deletes a ResourceValueConfig. * * @param name Required. Name of the ResourceValueConfig to delete */ async organizationsResourceValueConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a ResourceValueConfig. * * @param name Required. Name of the resource value config to retrieve. Its format is `organizations/{organization}/resourceValueConfigs/{config_id}`. */ async organizationsResourceValueConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1ResourceValueConfig; } /** * Lists all ResourceValueConfigs. * * @param parent Required. The parent, which owns the collection of resource value configs. Its format is `organizations/[organization_id]` */ async organizationsResourceValueConfigsList(parent: string, opts: OrganizationsResourceValueConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/resourceValueConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListResourceValueConfigsResponse; } /** * Updates an existing ResourceValueConfigs with new rules. * * @param name Name for the resource value configuration */ async organizationsResourceValueConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1ResourceValueConfig, opts: OrganizationsResourceValueConfigsPatchOptions = {}): Promise { opts = serializeOrganizationsResourceValueConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1ResourceValueConfig; } /** * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the * given CRM parent, and also creates inherited * SecurityHealthAnalyticsCustomModules for all CRM descendants of the given * parent. These modules are enabled by default. * * @param parent Required. Resource name of the new custom module's parent. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesCreate(parent: string, req: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its * descendants in the CRM hierarchy. This method is only supported for * resident custom modules. * * @param name Required. Name of the custom module to delete. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Retrieves a SecurityHealthAnalyticsCustomModule. * * @param name Required. Name of the custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Returns a list of all SecurityHealthAnalyticsCustomModules for the given * parent. This includes resident modules defined at the scope of the parent, * and inherited modules, inherited from CRM ancestors. * * @param parent Required. Name of parent to list custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesList(parent: string, opts: OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSecurityHealthAnalyticsCustomModulesResponse; } /** * Returns a list of all resident SecurityHealthAnalyticsCustomModules under * the given CRM parent and all of the parent’s CRM descendants. * * @param parent Required. Name of parent to list descendant custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendant(parent: string, opts: OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:listDescendant`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDescendantSecurityHealthAnalyticsCustomModulesResponse; } /** * Updates the SecurityHealthAnalyticsCustomModule under the given name based * on the given update mask. Updating the enablement state is supported on * both resident and inherited modules (though resident modules cannot have an * enablement state of "inherited"). Updating the display name and custom * config of a module is supported on resident modules only. * * @param name Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesPatch(name: string, req: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, opts: OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions = {}): Promise { opts = serializeOrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. * * @param parent Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}` */ async organizationsSecurityHealthAnalyticsSettingsCustomModulesSimulate(parent: string, req: SimulateSecurityHealthAnalyticsCustomModuleRequest): Promise { req = serializeSimulateSecurityHealthAnalyticsCustomModuleRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:simulate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeSimulateSecurityHealthAnalyticsCustomModuleResponse(data); } /** * Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. * * @param name Required. Name of the effective custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` */ async organizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule; } /** * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for * the given parent. This includes resident modules defined at the scope of * the parent, and inherited modules, inherited from CRM ancestors. * * @param parent Required. Name of parent to list effective custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async organizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesList(parent: string, opts: OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/effectiveCustomModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; } /** * Lists the attack paths for a set of simulation results or valued resources * and filter. * * @param parent Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` */ async organizationsSimulationsAttackExposureResultsAttackPathsList(parent: string, opts: OrganizationsSimulationsAttackExposureResultsAttackPathsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/attackPaths`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListAttackPathsResponse; } /** * Lists the valued resources for a set of simulation results and filter. * * @param parent Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` */ async organizationsSimulationsAttackExposureResultsValuedResourcesList(parent: string, opts: OrganizationsSimulationsAttackExposureResultsValuedResourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/valuedResources`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListValuedResourcesResponse; } /** * Lists the attack paths for a set of simulation results or valued resources * and filter. * * @param parent Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` */ async organizationsSimulationsAttackPathsList(parent: string, opts: OrganizationsSimulationsAttackPathsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/attackPaths`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListAttackPathsResponse; } /** * Get the simulation by name or the latest simulation for the given * organization. * * @param name Required. The organization name or simulation name of this simulation Valid format: `organizations/{organization}/simulations/latest` `organizations/{organization}/simulations/{simulation}` */ async organizationsSimulationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Simulation; } /** * Lists the attack paths for a set of simulation results or valued resources * and filter. * * @param parent Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` */ async organizationsSimulationsValuedResourcesAttackPathsList(parent: string, opts: OrganizationsSimulationsValuedResourcesAttackPathsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/attackPaths`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListAttackPathsResponse; } /** * Get the valued resource by name * * @param name Required. The name of this valued resource Valid format: `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` */ async organizationsSimulationsValuedResourcesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ValuedResource; } /** * Lists the valued resources for a set of simulation results and filter. * * @param parent Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` */ async organizationsSimulationsValuedResourcesList(parent: string, opts: OrganizationsSimulationsValuedResourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/valuedResources`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListValuedResourcesResponse; } /** * Creates a source. * * @param parent Required. Resource name of the new source's parent. Its format should be `organizations/[organization_id]`. */ async organizationsSourcesCreate(parent: string, req: Source): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sources`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Source; } /** * Creates a finding. The corresponding source must exist for finding * creation to succeed. * * @param parent Required. Resource name of the new finding's parent. Its format should be `organizations/[organization_id]/sources/[source_id]`. */ async organizationsSourcesFindingsCreate(parent: string, req: Finding, opts: OrganizationsSourcesFindingsCreateOptions = {}): Promise { req = serializeFinding(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings`); if (opts.findingId !== undefined) { url.searchParams.append("findingId", String(opts.findingId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates external system. This is for a given finding. * * @param name Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" */ async organizationsSourcesFindingsExternalSystemsPatch(name: string, req: GoogleCloudSecuritycenterV1ExternalSystem, opts: OrganizationsSourcesFindingsExternalSystemsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1ExternalSystem(req); opts = serializeOrganizationsSourcesFindingsExternalSystemsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1ExternalSystem(data); } /** * Filters an organization or source's findings and groups them by their * specified properties. To group across all sources provide a `-` as the * source id. Example: /v1/organizations/{organization_id}/sources/-/findings, * /v1/folders/{folder_id}/sources/-/findings, * /v1/projects/{project_id}/sources/-/findings * * @param parent Required. Name of the source to groupBy. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-` */ async organizationsSourcesFindingsGroup(parent: string, req: GroupFindingsRequest): Promise { req = serializeGroupFindingsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings:group`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGroupFindingsResponse(data); } /** * Lists an organization or source's findings. To list across all sources * provide a `-` as the source id. Example: * /v1/organizations/{organization_id}/sources/-/findings * * @param parent Required. Name of the source the findings belong to. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To list across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` */ async organizationsSourcesFindingsList(parent: string, opts: OrganizationsSourcesFindingsListOptions = {}): Promise { opts = serializeOrganizationsSourcesFindingsListOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings`); if (opts.compareDuration !== undefined) { url.searchParams.append("compareDuration", String(opts.compareDuration)); } if (opts.fieldMask !== undefined) { url.searchParams.append("fieldMask", String(opts.fieldMask)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.readTime !== undefined) { url.searchParams.append("readTime", String(opts.readTime)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListFindingsResponse(data); } /** * Creates or updates a finding. The corresponding source must exist for a * finding creation to succeed. * * @param name The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". */ async organizationsSourcesFindingsPatch(name: string, req: Finding, opts: OrganizationsSourcesFindingsPatchOptions = {}): Promise { req = serializeFinding(req); opts = serializeOrganizationsSourcesFindingsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeFinding(data); } /** * Updates the mute state of a finding. * * @param name Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ async organizationsSourcesFindingsSetMute(name: string, req: SetMuteRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:setMute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates the state of a finding. * * @param name Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ async organizationsSourcesFindingsSetState(name: string, req: SetFindingStateRequest): Promise { req = serializeSetFindingStateRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:setState`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates security marks. * * @param name 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". */ async organizationsSourcesFindingsUpdateSecurityMarks(name: string, req: SecurityMarks, opts: OrganizationsSourcesFindingsUpdateSecurityMarksOptions = {}): Promise { opts = serializeOrganizationsSourcesFindingsUpdateSecurityMarksOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.startTime !== undefined) { url.searchParams.append("startTime", String(opts.startTime)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as SecurityMarks; } /** * Gets a source. * * @param name Required. Relative resource name of the source. Its format is `organizations/[organization_id]/source/[source_id]`. */ async organizationsSourcesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Source; } /** * Gets the access control policy on the specified Source. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async organizationsSourcesGetIamPolicy(resource: string, req: GetIamPolicyRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Lists all sources belonging to an organization. * * @param parent Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async organizationsSourcesList(parent: string, opts: OrganizationsSourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sources`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSourcesResponse; } /** * Updates a source. * * @param name The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}" */ async organizationsSourcesPatch(name: string, req: Source, opts: OrganizationsSourcesPatchOptions = {}): Promise { opts = serializeOrganizationsSourcesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Source; } /** * Sets the access control policy on the specified Source. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async organizationsSourcesSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns the permissions that a caller has on the specified source. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async organizationsSourcesTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Updates an organization's settings. * * @param name The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/organizationSettings". */ async organizationsUpdateOrganizationSettings(name: string, req: OrganizationSettings, opts: OrganizationsUpdateOrganizationSettingsOptions = {}): Promise { opts = serializeOrganizationsUpdateOrganizationSettingsOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as OrganizationSettings; } /** * Lists the valued resources for a set of simulation results and filter. * * @param parent Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` */ async organizationsValuedResourcesList(parent: string, opts: OrganizationsValuedResourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/valuedResources`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListValuedResourcesResponse; } /** * Filters an organization's assets and groups them by their specified * properties. * * @param parent Required. The name of the parent to group the assets by. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async projectsAssetsGroup(parent: string, req: GroupAssetsRequest): Promise { req = serializeGroupAssetsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/assets:group`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGroupAssetsResponse(data); } /** * Lists an organization's assets. * * @param parent Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async projectsAssetsList(parent: string, opts: ProjectsAssetsListOptions = {}): Promise { opts = serializeProjectsAssetsListOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/assets`); if (opts.compareDuration !== undefined) { url.searchParams.append("compareDuration", String(opts.compareDuration)); } if (opts.fieldMask !== undefined) { url.searchParams.append("fieldMask", String(opts.fieldMask)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.readTime !== undefined) { url.searchParams.append("readTime", String(opts.readTime)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListAssetsResponse(data); } /** * Updates security marks. * * @param name 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". */ async projectsAssetsUpdateSecurityMarks(name: string, req: SecurityMarks, opts: ProjectsAssetsUpdateSecurityMarksOptions = {}): Promise { opts = serializeProjectsAssetsUpdateSecurityMarksOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.startTime !== undefined) { url.searchParams.append("startTime", String(opts.startTime)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as SecurityMarks; } /** * Creates a BigQuery export. * * @param parent Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async projectsBigQueryExportsCreate(parent: string, req: GoogleCloudSecuritycenterV1BigQueryExport, opts: ProjectsBigQueryExportsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bigQueryExports`); if (opts.bigQueryExportId !== undefined) { url.searchParams.append("bigQueryExportId", String(opts.bigQueryExportId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Deletes an existing BigQuery export. * * @param name Required. The name of the BigQuery export to delete. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}` */ async projectsBigQueryExportsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a BigQuery export. * * @param name Required. Name of the BigQuery export to retrieve. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}` */ async projectsBigQueryExportsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Lists BigQuery exports. Note that when requesting BigQuery exports at a * given level all exports under that level are also returned e.g. if * requesting BigQuery exports under a folder, then all BigQuery exports * immediately under the folder plus the ones created under the projects * within the folder are returned. * * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async projectsBigQueryExportsList(parent: string, opts: ProjectsBigQueryExportsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bigQueryExports`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBigQueryExportsResponse; } /** * Updates a BigQuery export. * * @param name The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is ignored when provided in create requests. */ async projectsBigQueryExportsPatch(name: string, req: GoogleCloudSecuritycenterV1BigQueryExport, opts: ProjectsBigQueryExportsPatchOptions = {}): Promise { opts = serializeProjectsBigQueryExportsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1BigQueryExport; } /** * Creates a resident Event Threat Detection custom module at the scope of * the given Resource Manager parent, and also creates inherited custom * modules for all descendants of the given parent. These modules are enabled * by default. * * @param parent Required. The new custom module's parent. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async projectsEventThreatDetectionSettingsCustomModulesCreate(parent: string, req: EventThreatDetectionCustomModule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as EventThreatDetectionCustomModule; } /** * Deletes the specified Event Threat Detection custom module and all of its * descendants in the Resource Manager hierarchy. This method is only * supported for resident custom modules. * * @param name Required. Name of the custom module to delete. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async projectsEventThreatDetectionSettingsCustomModulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets an Event Threat Detection custom module. * * @param name Required. Name of the custom module to get. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async projectsEventThreatDetectionSettingsCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as EventThreatDetectionCustomModule; } /** * Lists all Event Threat Detection custom modules for the given Resource * Manager parent. This includes resident modules defined at the scope of the * parent along with modules inherited from ancestors. * * @param parent Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async projectsEventThreatDetectionSettingsCustomModulesList(parent: string, opts: ProjectsEventThreatDetectionSettingsCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEventThreatDetectionCustomModulesResponse; } /** * Lists all resident Event Threat Detection custom modules under the given * Resource Manager parent and its descendants. * * @param parent Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async projectsEventThreatDetectionSettingsCustomModulesListDescendant(parent: string, opts: ProjectsEventThreatDetectionSettingsCustomModulesListDescendantOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:listDescendant`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDescendantEventThreatDetectionCustomModulesResponse; } /** * Updates the Event Threat Detection custom module with the given name based * on the given update mask. Updating the enablement state is supported for * both resident and inherited modules (though resident modules cannot have an * enablement state of "inherited"). Updating the display name or * configuration of a module is supported for resident modules only. The type * of a module cannot be changed. * * @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ async projectsEventThreatDetectionSettingsCustomModulesPatch(name: string, req: EventThreatDetectionCustomModule, opts: ProjectsEventThreatDetectionSettingsCustomModulesPatchOptions = {}): Promise { opts = serializeProjectsEventThreatDetectionSettingsCustomModulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as EventThreatDetectionCustomModule; } /** * Gets an effective Event Threat Detection custom module at the given level. * * @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. */ async projectsEventThreatDetectionSettingsEffectiveCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as EffectiveEventThreatDetectionCustomModule; } /** * Lists all effective Event Threat Detection custom modules for the given * parent. This includes resident modules defined at the scope of the parent * along with modules inherited from its ancestors. * * @param parent Required. Name of the parent to list custom modules for. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async projectsEventThreatDetectionSettingsEffectiveCustomModulesList(parent: string, opts: ProjectsEventThreatDetectionSettingsEffectiveCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/effectiveCustomModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEffectiveEventThreatDetectionCustomModulesResponse; } /** * Validates the given Event Threat Detection custom module. * * @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`. */ async projectsEventThreatDetectionSettingsValidateCustomModule(parent: string, req: ValidateEventThreatDetectionCustomModuleRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:validateCustomModule`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ValidateEventThreatDetectionCustomModuleResponse; } /** * Kicks off an LRO to bulk mute findings for a parent based on a filter. The * parent can be either an organization, folder or project. The findings * matched by the filter will be muted after the LRO is done. * * @param parent Required. The parent, at which bulk action needs to be applied. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async projectsFindingsBulkMute(parent: string, req: BulkMuteFindingsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/findings:bulkMute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes an existing mute config. * * @param name Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async projectsLocationsMuteConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a mute config. * * @param name Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async projectsLocationsMuteConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Updates a mute config. * * @param name This field will be ignored if provided on config creation. Format `organizations/{organization}/muteConfigs/{mute_config}` `folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}` `organizations/{organization}/locations/global/muteConfigs/{mute_config}` `folders/{folder}/locations/global/muteConfigs/{mute_config}` `projects/{project}/locations/global/muteConfigs/{mute_config}` */ async projectsLocationsMuteConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: ProjectsLocationsMuteConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); opts = serializeProjectsLocationsMuteConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Creates a mute config. * * @param parent Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async projectsMuteConfigsCreate(parent: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: ProjectsMuteConfigsCreateOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/muteConfigs`); if (opts.muteConfigId !== undefined) { url.searchParams.append("muteConfigId", String(opts.muteConfigId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Deletes an existing mute config. * * @param name Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async projectsMuteConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a mute config. * * @param name Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`. */ async projectsMuteConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Lists mute configs. * * @param parent Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`. */ async projectsMuteConfigsList(parent: string, opts: ProjectsMuteConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/muteConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListMuteConfigsResponse(data); } /** * Updates a mute config. * * @param name This field will be ignored if provided on config creation. Format `organizations/{organization}/muteConfigs/{mute_config}` `folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}` `organizations/{organization}/locations/global/muteConfigs/{mute_config}` `folders/{folder}/locations/global/muteConfigs/{mute_config}` `projects/{project}/locations/global/muteConfigs/{mute_config}` */ async projectsMuteConfigsPatch(name: string, req: GoogleCloudSecuritycenterV1MuteConfig, opts: ProjectsMuteConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1MuteConfig(req); opts = serializeProjectsMuteConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1MuteConfig(data); } /** * Creates a notification config. * * @param parent Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async projectsNotificationConfigsCreate(parent: string, req: NotificationConfig, opts: ProjectsNotificationConfigsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/notificationConfigs`); if (opts.configId !== undefined) { url.searchParams.append("configId", String(opts.configId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as NotificationConfig; } /** * Deletes a notification config. * * @param name Required. Name of the notification config to delete. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`. */ async projectsNotificationConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a notification config. * * @param name Required. Name of the notification config to get. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`. */ async projectsNotificationConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as NotificationConfig; } /** * Lists notification configs. * * @param parent Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". */ async projectsNotificationConfigsList(parent: string, opts: ProjectsNotificationConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/notificationConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListNotificationConfigsResponse; } /** * Updates a notification config. The following update fields are allowed: * description, pubsub_topic, streaming_config.filter * * @param name The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". */ async projectsNotificationConfigsPatch(name: string, req: NotificationConfig, opts: ProjectsNotificationConfigsPatchOptions = {}): Promise { opts = serializeProjectsNotificationConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as NotificationConfig; } /** * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the * given CRM parent, and also creates inherited * SecurityHealthAnalyticsCustomModules for all CRM descendants of the given * parent. These modules are enabled by default. * * @param parent Required. Resource name of the new custom module's parent. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async projectsSecurityHealthAnalyticsSettingsCustomModulesCreate(parent: string, req: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its * descendants in the CRM hierarchy. This method is only supported for * resident custom modules. * * @param name Required. Name of the custom module to delete. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ async projectsSecurityHealthAnalyticsSettingsCustomModulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Retrieves a SecurityHealthAnalyticsCustomModule. * * @param name Required. Name of the custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ async projectsSecurityHealthAnalyticsSettingsCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Returns a list of all SecurityHealthAnalyticsCustomModules for the given * parent. This includes resident modules defined at the scope of the parent, * and inherited modules, inherited from CRM ancestors. * * @param parent Required. Name of parent to list custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async projectsSecurityHealthAnalyticsSettingsCustomModulesList(parent: string, opts: ProjectsSecurityHealthAnalyticsSettingsCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSecurityHealthAnalyticsCustomModulesResponse; } /** * Returns a list of all resident SecurityHealthAnalyticsCustomModules under * the given CRM parent and all of the parent’s CRM descendants. * * @param parent Required. Name of parent to list descendant custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async projectsSecurityHealthAnalyticsSettingsCustomModulesListDescendant(parent: string, opts: ProjectsSecurityHealthAnalyticsSettingsCustomModulesListDescendantOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:listDescendant`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDescendantSecurityHealthAnalyticsCustomModulesResponse; } /** * Updates the SecurityHealthAnalyticsCustomModule under the given name based * on the given update mask. Updating the enablement state is supported on * both resident and inherited modules (though resident modules cannot have an * enablement state of "inherited"). Updating the display name and custom * config of a module is supported on resident modules only. * * @param name Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. */ async projectsSecurityHealthAnalyticsSettingsCustomModulesPatch(name: string, req: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, opts: ProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions = {}): Promise { opts = serializeProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule; } /** * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. * * @param parent Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}` */ async projectsSecurityHealthAnalyticsSettingsCustomModulesSimulate(parent: string, req: SimulateSecurityHealthAnalyticsCustomModuleRequest): Promise { req = serializeSimulateSecurityHealthAnalyticsCustomModuleRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/customModules:simulate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeSimulateSecurityHealthAnalyticsCustomModuleResponse(data); } /** * Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. * * @param name Required. Name of the effective custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` */ async projectsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule; } /** * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for * the given parent. This includes resident modules defined at the scope of * the parent, and inherited modules, inherited from CRM ancestors. * * @param parent Required. Name of parent to list effective custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings` */ async projectsSecurityHealthAnalyticsSettingsEffectiveCustomModulesList(parent: string, opts: ProjectsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/effectiveCustomModules`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; } /** * Updates external system. This is for a given finding. * * @param name Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" */ async projectsSourcesFindingsExternalSystemsPatch(name: string, req: GoogleCloudSecuritycenterV1ExternalSystem, opts: ProjectsSourcesFindingsExternalSystemsPatchOptions = {}): Promise { req = serializeGoogleCloudSecuritycenterV1ExternalSystem(req); opts = serializeProjectsSourcesFindingsExternalSystemsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudSecuritycenterV1ExternalSystem(data); } /** * Filters an organization or source's findings and groups them by their * specified properties. To group across all sources provide a `-` as the * source id. Example: /v1/organizations/{organization_id}/sources/-/findings, * /v1/folders/{folder_id}/sources/-/findings, * /v1/projects/{project_id}/sources/-/findings * * @param parent Required. Name of the source to groupBy. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-` */ async projectsSourcesFindingsGroup(parent: string, req: GroupFindingsRequest): Promise { req = serializeGroupFindingsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings:group`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGroupFindingsResponse(data); } /** * Lists an organization or source's findings. To list across all sources * provide a `-` as the source id. Example: * /v1/organizations/{organization_id}/sources/-/findings * * @param parent Required. Name of the source the findings belong to. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To list across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` */ async projectsSourcesFindingsList(parent: string, opts: ProjectsSourcesFindingsListOptions = {}): Promise { opts = serializeProjectsSourcesFindingsListOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/findings`); if (opts.compareDuration !== undefined) { url.searchParams.append("compareDuration", String(opts.compareDuration)); } if (opts.fieldMask !== undefined) { url.searchParams.append("fieldMask", String(opts.fieldMask)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.readTime !== undefined) { url.searchParams.append("readTime", String(opts.readTime)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListFindingsResponse(data); } /** * Creates or updates a finding. The corresponding source must exist for a * finding creation to succeed. * * @param name The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". */ async projectsSourcesFindingsPatch(name: string, req: Finding, opts: ProjectsSourcesFindingsPatchOptions = {}): Promise { req = serializeFinding(req); opts = serializeProjectsSourcesFindingsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeFinding(data); } /** * Updates the mute state of a finding. * * @param name Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ async projectsSourcesFindingsSetMute(name: string, req: SetMuteRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:setMute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates the state of a finding. * * @param name Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ async projectsSourcesFindingsSetState(name: string, req: SetFindingStateRequest): Promise { req = serializeSetFindingStateRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:setState`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFinding(data); } /** * Updates security marks. * * @param name 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". */ async projectsSourcesFindingsUpdateSecurityMarks(name: string, req: SecurityMarks, opts: ProjectsSourcesFindingsUpdateSecurityMarksOptions = {}): Promise { opts = serializeProjectsSourcesFindingsUpdateSecurityMarksOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.startTime !== undefined) { url.searchParams.append("startTime", String(opts.startTime)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as SecurityMarks; } /** * Lists all sources belonging to an organization. * * @param parent Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`. */ async projectsSourcesList(parent: string, opts: ProjectsSourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sources`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSourcesResponse; } } /** * Represents an access event. */ export interface Access { /** * Caller's IP address, such as "1.1.1.1". */ callerIp?: string; /** * The caller IP's geolocation, which identifies where the call came from. */ callerIpGeo?: Geolocation; /** * The method that the service account called, e.g. "SetIamPolicy". */ methodName?: string; /** * Associated email, such as "foo@google.com". The email address of the * authenticated user or a service account acting on behalf of a third party * principal making the request. For third party identity callers, the * `principal_subject` field is populated instead of this field. For privacy * reasons, the principal email address is sometimes redacted. For more * information, see [Caller identities in audit * logs](https://cloud.google.com/logging/docs/audit#user-id). */ principalEmail?: string; /** * A string that represents the principal_subject that is associated with the * identity. Unlike `principal_email`, `principal_subject` supports principals * that aren't associated with email addresses, such as third party * principals. For most identities, the format is * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, * still use the legacy format `serviceAccount:{identity pool * name}[{subject}]`. */ principalSubject?: string; /** * The identity delegation history of an authenticated service account that * made the request. The `serviceAccountDelegationInfo[]` object contains * information about the real authorities that try to access Google Cloud * resources by delegating on a service account. When multiple authorities are * present, they are guaranteed to be sorted based on the original ordering of * the identity delegation events. */ serviceAccountDelegationInfo?: ServiceAccountDelegationInfo[]; /** * The name of the service account key that was used to create or exchange * credentials when authenticating the service account that made the request. * This is a scheme-less URI full resource name. For example: * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}". * */ serviceAccountKeyName?: string; /** * This is the API service that the service account made a call to, e.g. * "iam.googleapis.com" */ serviceName?: string; /** * The caller's user agent string associated with the finding. */ userAgent?: string; /** * Type of user agent associated with the finding. For example, an operating * system shell or an embedded or standalone application. */ userAgentFamily?: string; /** * A string that represents a username. The username provided depends on the * type of the finding and is likely not an IAM principal. For example, this * can be a system username if the finding is related to a virtual machine, or * it can be an application login username. */ userName?: string; } /** * Conveys information about a Kubernetes access review (such as one returned * by a [`kubectl auth * can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) * command) that was involved in a finding. */ export interface AccessReview { /** * The API group of the resource. "*" means all. */ group?: string; /** * The name of the resource being requested. Empty means all. */ name?: string; /** * Namespace of the action being requested. Currently, there is no * distinction between no namespace and all namespaces. Both are represented * by "" (empty). */ ns?: string; /** * The optional resource type requested. "*" means all. */ resource?: string; /** * The optional subresource type. */ subresource?: string; /** * A Kubernetes resource API verb, like get, list, watch, create, update, * delete, proxy. "*" means all. */ verb?: string; /** * The API version of the resource. "*" means all. */ version?: string; } /** * Information about [Google Cloud Armor Adaptive * Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). */ export interface AdaptiveProtection { /** * A score of 0 means that there is low confidence that the detected event is * an actual attack. A score of 1 means that there is high confidence that the * detected event is an attack. See the [Adaptive Protection * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) * for further explanation. */ confidence?: number; } /** * Represents an application associated with a finding. */ export interface Application { /** * The base URI that identifies the network location of the application in * which the vulnerability was detected. For example, `http://example.com`. */ baseUri?: string; /** * The full URI with payload that can be used to reproduce the vulnerability. * For example, `http://example.com?p=aMmYgI6H`. */ fullUri?: string; } /** * Security Command Center representation of a Google Cloud resource. The Asset * is a Security Command Center resource that captures information about a * single Google Cloud resource. All modifications to an Asset are only within * the context of Security Command Center and don't affect the referenced Google * Cloud resource. */ export interface Asset { /** * The canonical name of the resource. It's either * "organizations/{organization_id}/assets/{asset_id}", * "folders/{folder_id}/assets/{asset_id}" or * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM * ancestor of the resource. */ canonicalName?: string; /** * The time at which the asset was created in Security Command Center. */ createTime?: Date; /** * Cloud IAM Policy information associated with the Google Cloud resource * described by the Security Command Center asset. This information is managed * and defined by the Google Cloud resource and cannot be modified by the * user. */ iamPolicy?: IamPolicy; /** * The relative resource name of this asset. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: "organizations/{organization_id}/assets/{asset_id}". */ name?: string; /** * Resource managed properties. These properties are managed and defined by * the Google Cloud resource and cannot be modified by the user. */ resourceProperties?: { [key: string]: any }; /** * Security Command Center managed properties. These properties are managed * by Security Command Center and cannot be modified by the user. */ securityCenterProperties?: SecurityCenterProperties; /** * User specified security marks. These marks are entirely managed by the * user and come from the SecurityMarks resource that belongs to the asset. */ securityMarks?: SecurityMarks; /** * The time at which the asset was last updated or added in Cloud SCC. */ updateTime?: Date; } function serializeAsset(data: any): Asset { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeAsset(data: any): Asset { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * The configuration used for Asset Discovery runs. */ export interface AssetDiscoveryConfig { /** * The folder ids to use for filtering asset discovery. It consists of only * digits, e.g., 756619654966. */ folderIds?: string[]; /** * The mode to use for filtering asset discovery. */ inclusionMode?: | "INCLUSION_MODE_UNSPECIFIED" | "INCLUDE_ONLY" | "EXCLUDE"; /** * The project ids to use for filtering asset discovery. */ projectIds?: string[]; } /** * Information about DDoS attack volume and classification. */ export interface Attack { /** * Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. */ classification?: string; /** * Total BPS (bytes per second) volume of attack. */ volumeBps?: number; /** * Total PPS (packets per second) volume of attack. */ volumePps?: number; } /** * An attack exposure contains the results of an attack path simulation run. */ export interface AttackExposure { /** * The resource name of the attack path simulation result that contains the * details regarding this attack exposure score. Example: * `organizations/123/simulations/456/attackExposureResults/789` */ attackExposureResult?: string; /** * The number of high value resources that are exposed as a result of this * finding. */ exposedHighValueResourcesCount?: number; /** * The number of high value resources that are exposed as a result of this * finding. */ exposedLowValueResourcesCount?: number; /** * The number of medium value resources that are exposed as a result of this * finding. */ exposedMediumValueResourcesCount?: number; /** * The most recent time the attack exposure was updated on this finding. */ latestCalculationTime?: Date; /** * A number between 0 (inclusive) and infinity that represents how important * this finding is to remediate. The higher the score, the more important it * is to remediate. */ score?: number; /** * What state this AttackExposure is in. This captures whether or not an * attack exposure has been calculated or not. */ state?: | "STATE_UNSPECIFIED" | "CALCULATED" | "NOT_CALCULATED"; } function serializeAttackExposure(data: any): AttackExposure { return { ...data, latestCalculationTime: data["latestCalculationTime"] !== undefined ? data["latestCalculationTime"].toISOString() : undefined, }; } function deserializeAttackExposure(data: any): AttackExposure { return { ...data, latestCalculationTime: data["latestCalculationTime"] !== undefined ? new Date(data["latestCalculationTime"]) : undefined, }; } /** * A path that an attacker could take to reach an exposed resource. */ export interface AttackPath { /** * A list of the edges between nodes in this attack path. */ edges?: AttackPathEdge[]; /** * The attack path name, for example, * `organizations/12/simulation/34/valuedResources/56/attackPaths/78` */ name?: string; /** * A list of nodes that exist in this attack path. */ pathNodes?: AttackPathNode[]; } /** * Represents a connection between a source node and a destination node in this * attack path. */ export interface AttackPathEdge { /** * The attack node uuid of the destination node. */ destination?: string; /** * The attack node uuid of the source node. */ source?: string; } /** * Represents one point that an attacker passes through in this attack path. */ export interface AttackPathNode { /** * The findings associated with this node in the attack path. */ associatedFindings?: PathNodeAssociatedFinding[]; /** * A list of attack step nodes that exist in this attack path node. */ attackSteps?: AttackStepNode[]; /** * Human-readable name of this resource. */ displayName?: string; /** * The name of the resource at this point in the attack path. The format of * the name follows the Cloud Asset Inventory [resource name * format](https://cloud.google.com/asset-inventory/docs/resource-name-format) */ resource?: string; /** * The [supported resource * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) */ resourceType?: string; /** * Unique id of the attack path node. */ uuid?: string; } /** * Detailed steps the attack can take between path nodes. */ export interface AttackStepNode { /** * Attack step description */ description?: string; /** * User friendly name of the attack step */ displayName?: string; /** * Attack step labels for metadata */ labels?: { [key: string]: string }; /** * Attack step type. Can be either AND, OR or DEFENSE */ type?: | "NODE_TYPE_UNSPECIFIED" | "NODE_TYPE_AND" | "NODE_TYPE_OR" | "NODE_TYPE_DEFENSE" | "NODE_TYPE_ATTACKER"; /** * Unique ID for one Node */ uuid?: string; } /** * Specifies the audit configuration for a service. The configuration * determines which permission types are logged, and what identities, if any, * are exempted from logging. An AuditConfig must have one or more * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a * specific service, the union of the two AuditConfigs is used for that service: * the log_types specified in each AuditConfig are enabled, and the * exempted_members in each AuditLogConfig are exempted. Example Policy with * multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", * "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ * "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": * "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", * "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": * "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For * sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ * logging. It also exempts `jose@example.com` from DATA_READ logging, and * `aliya@example.com` from DATA_WRITE logging. */ export interface AuditConfig { /** * The configuration for logging of each type of permission. */ auditLogConfigs?: AuditLogConfig[]; /** * Specifies a service that will be enabled for audit logging. For example, * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a * special value that covers all services. */ service?: string; } /** * Provides the configuration for logging a type of permissions. Example: { * "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ * "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables * 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from * DATA_READ logging. */ export interface AuditLogConfig { /** * Specifies the identities that do not cause logging for this type of * permission. Follows the same format of Binding.members. */ exemptedMembers?: string[]; /** * The log type that this config enables. */ logType?: | "LOG_TYPE_UNSPECIFIED" | "ADMIN_READ" | "DATA_WRITE" | "DATA_READ"; } /** * An AWS account that is a member of an organization. */ export interface AwsAccount { /** * The unique identifier (ID) of the account, containing exactly 12 digits. */ id?: string; /** * The friendly name of this account. */ name?: string; } /** * AWS metadata associated with the resource, only applicable if the finding's * cloud provider is Amazon Web Services. */ export interface AwsMetadata { /** * The AWS account associated with the resource. */ account?: AwsAccount; /** * The AWS organization associated with the resource. */ organization?: AwsOrganization; /** * A list of AWS organizational units associated with the resource, ordered * from lowest level (closest to the account) to highest level. */ organizationalUnits?: AwsOrganizationalUnit[]; } /** * An organization is a collection of accounts that are centrally managed * together using consolidated billing, organized hierarchically with * organizational units (OUs), and controlled with policies. */ export interface AwsOrganization { /** * The unique identifier (ID) for the organization. The regex pattern for an * organization ID string requires "o-" followed by from 10 to 32 lowercase * letters or digits. */ id?: string; } /** * An Organizational Unit (OU) is a container of AWS accounts within a root of * an organization. Policies that are attached to an OU apply to all accounts * contained in that OU and in any child OUs. */ export interface AwsOrganizationalUnit { /** * The unique identifier (ID) associated with this OU. The regex pattern for * an organizational unit ID string requires "ou-" followed by from 4 to 32 * lowercase letters or digits (the ID of the root that contains the OU). This * string is followed by a second "-" dash and from 8 to 32 additional * lowercase letters or digits. For example, "ou-ab12-cd34ef56". */ id?: string; /** * The friendly name of the OU. */ name?: string; } /** * Represents an Azure management group. */ export interface AzureManagementGroup { /** * The display name of the Azure management group. */ displayName?: string; /** * The UUID of the Azure management group, for example, * `20000000-0001-0000-0000-000000000000`. */ id?: string; } /** * Azure metadata associated with the resource, only applicable if the * finding's cloud provider is Microsoft Azure. */ export interface AzureMetadata { /** * A list of Azure management groups associated with the resource, ordered * from lowest level (closest to the subscription) to highest level. */ managementGroups?: AzureManagementGroup[]; /** * The Azure resource group associated with the resource. */ resourceGroup?: AzureResourceGroup; /** * The Azure subscription associated with the resource. */ subscription?: AzureSubscription; /** * The Azure Entra tenant associated with the resource. */ tenant?: AzureTenant; } /** * Represents an Azure resource group. */ export interface AzureResourceGroup { /** * The ID of the Azure resource group. */ id?: string; /** * The name of the Azure resource group. This is not a UUID. */ name?: string; } /** * Represents an Azure subscription. */ export interface AzureSubscription { /** * The display name of the Azure subscription. */ displayName?: string; /** * The UUID of the Azure subscription, for example, * `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. */ id?: string; } /** * Represents a Microsoft Entra tenant. */ export interface AzureTenant { /** * The display name of the Azure tenant. */ displayName?: string; /** * The ID of the Microsoft Entra tenant, for example, * "a11aaa11-aa11-1aa1-11aa-1aaa11a". */ id?: string; } /** * Information related to Google Cloud Backup and DR Service findings. */ export interface BackupDisasterRecovery { /** * The name of the Backup and DR appliance that captures, moves, and manages * the lifecycle of backup data. For example, `backup-server-57137`. */ appliance?: string; /** * The names of Backup and DR applications. An application is a VM, database, * or file system on a managed host monitored by a backup and recovery * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, * `centos7-01-vol02`. */ applications?: string[]; /** * The timestamp at which the Backup and DR backup was created. */ backupCreateTime?: Date; /** * The name of a Backup and DR template which comprises one or more backup * policies. See the [Backup and DR * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) * for more information. For example, `snap-ov`. */ backupTemplate?: string; /** * The backup type of the Backup and DR image. For example, `Snapshot`, * `Remote Snapshot`, `OnVault`. */ backupType?: string; /** * The name of a Backup and DR host, which is managed by the backup and * recovery appliance and known to the management console. The host can be of * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file * system, etc.), vCenter, or an ESX server. See the [Backup and DR * documentation on * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) * for more information. For example, `centos7-01`. */ host?: string; /** * The names of Backup and DR policies that are associated with a template * and that define when to run a backup, how frequently to run a backup, and * how long to retain the backup image. For example, `onvaults`. */ policies?: string[]; /** * The names of Backup and DR advanced policy options of a policy applying to * an application. See the [Backup and DR documentation on policy * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). * For example, `skipofflineappsincongrp, nounmap`. */ policyOptions?: string[]; /** * The name of the Backup and DR resource profile that specifies the storage * media for backups of application and VM data. See the [Backup and DR * documentation on * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). * For example, `GCP`. */ profile?: string; /** * The name of the Backup and DR storage pool that the backup and recovery * appliance is storing data in. The storage pool could be of type Cloud, * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on * storage * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). * For example, `DiskPoolOne`. */ storagePool?: string; } function serializeBackupDisasterRecovery(data: any): BackupDisasterRecovery { return { ...data, backupCreateTime: data["backupCreateTime"] !== undefined ? data["backupCreateTime"].toISOString() : undefined, }; } function deserializeBackupDisasterRecovery(data: any): BackupDisasterRecovery { return { ...data, backupCreateTime: data["backupCreateTime"] !== undefined ? new Date(data["backupCreateTime"]) : undefined, }; } /** * Request message to create multiple resource value configs */ export interface BatchCreateResourceValueConfigsRequest { /** * Required. The resource value configs to be created. */ requests?: CreateResourceValueConfigRequest[]; } /** * Response message for BatchCreateResourceValueConfigs */ export interface BatchCreateResourceValueConfigsResponse { /** * The resource value configs created */ resourceValueConfigs?: GoogleCloudSecuritycenterV1ResourceValueConfig[]; } /** * Associates `members`, or principals, with a `role`. */ export interface Binding { /** * The condition that is associated with this binding. If the condition * evaluates to `true`, then this binding applies to the current request. If * the condition evaluates to `false`, then this binding does not apply to the * current request. However, a different role binding might grant the same * role to one or more of the principals in this binding. To learn which * resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ condition?: Expr; /** * Specifies the principals requesting access for a Google Cloud resource. * `members` can have the following values: * `allUsers`: A special identifier * that represents anyone who is on the internet; with or without a Google * account. * `allAuthenticatedUsers`: A special identifier that represents * anyone who is authenticated with a Google account or a service account. * Does not include identities that come from external identity providers * (IdPs) through identity federation. * `user:{emailid}`: An email address * that represents a specific Google account. For example, `alice@example.com` * . * `serviceAccount:{emailid}`: An email address that represents a Google * service account. For example, `my-other-app@appspot.gserviceaccount.com`. * * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An * identifier for a [Kubernetes service * account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). * For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * * `group:{emailid}`: An email address that represents a Google group. For * example, `admins@example.com`. * `domain:{domain}`: The G Suite domain * (primary) that represents all the users of that domain. For example, * `google.com` or `example.com`. * * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: * A single identity in a workforce identity pool. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: * All workforce identities in a group. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: * All workforce identities with a specific attribute value. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: * All identities in a workforce identity pool. * * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: * A single identity in a workload identity pool. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: * A workload identity pool group. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: * All identities in a workload identity pool with a certain attribute. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: * All identities in a workload identity pool. * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique * identifier) representing a user that has been recently deleted. For * example, `alice@example.com?uid=123456789012345678901`. If the user is * recovered, this value reverts to `user:{emailid}` and the recovered user * retains the role in the binding. * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus * unique identifier) representing a service account that has been recently * deleted. For example, * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If * the service account is undeleted, this value reverts to * `serviceAccount:{emailid}` and the undeleted service account retains the * role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email * address (plus unique identifier) representing a Google group that has been * recently deleted. For example, * `admins@example.com?uid=123456789012345678901`. If the group is recovered, * this value reverts to `group:{emailid}` and the recovered group retains the * role in the binding. * * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: * Deleted single identity in a workforce identity pool. For example, * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. */ members?: string[]; /** * Role that is assigned to the list of `members`, or principals. For * example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview * of the IAM roles and permissions, see the [IAM * documentation](https://cloud.google.com/iam/docs/roles-overview). For a * list of the available pre-defined roles, see * [here](https://cloud.google.com/iam/docs/understanding-roles). */ role?: string; } /** * Request message for bulk findings update. Note: 1. If multiple bulk update * requests match the same resource, the order in which they get executed is not * defined. 2. Once a bulk operation is started, there is no way to stop it. */ export interface BulkMuteFindingsRequest { /** * Expression that identifies findings that should be updated. The expression * is a list of zero or more restrictions combined via logical operators `AND` * and `OR`. Parentheses are supported, and `OR` has higher precedence than * `AND`. Restrictions have the form ` ` and may have a `-` character in front * of them to indicate negation. The fields map to those defined in the * corresponding resource. The supported operators are: * `=` for all value * types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring * matching, for strings. The supported value types are: * string literals in * quotes. * integer literals without quotes. * boolean literals `true` and * `false` without quotes. */ filter?: string; /** * This can be a mute configuration name or any identifier for mute/unmute of * findings based on the filter. */ muteAnnotation?: string; /** * Optional. All findings matching the given filter will have their mute * state set to this value. The default value is `MUTED`. Setting this to * `UNDEFINED` will clear the mute state on all matching findings. */ muteState?: | "MUTE_STATE_UNSPECIFIED" | "MUTED" | "UNDEFINED"; } /** * Fields related to Google Cloud Armor findings. */ export interface CloudArmor { /** * Information about potential Layer 7 DDoS attacks identified by [Google * Cloud Armor Adaptive * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). */ adaptiveProtection?: AdaptiveProtection; /** * Information about DDoS attack volume and classification. */ attack?: Attack; /** * Duration of attack from the start until the current moment (updated every * 5 minutes). */ duration?: number /* Duration */; /** * Information about incoming requests evaluated by [Google Cloud Armor * security * policies](https://cloud.google.com/armor/docs/security-policy-overview). */ requests?: Requests; /** * Information about the [Google Cloud Armor security * policy](https://cloud.google.com/armor/docs/security-policy-overview) * relevant to the finding. */ securityPolicy?: SecurityPolicy; /** * Distinguish between volumetric & protocol DDoS attack and application * layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS attacks, or * "L_7" for Layer 7 DDoS attacks. */ threatVector?: string; } function serializeCloudArmor(data: any): CloudArmor { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } function deserializeCloudArmor(data: any): CloudArmor { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } /** * The [data profile](https://cloud.google.com/dlp/docs/data-profiles) * associated with the finding. */ export interface CloudDlpDataProfile { /** * Name of the data profile, for example, * `projects/123/locations/europe/tableProfiles/8383929`. */ dataProfile?: string; /** * The resource hierarchy level at which the data profile was generated. */ parentType?: | "PARENT_TYPE_UNSPECIFIED" | "ORGANIZATION" | "PROJECT"; } /** * Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection * job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced * the finding. */ export interface CloudDlpInspection { /** * Whether Cloud DLP scanned the complete resource or a sampled subset. */ fullScan?: boolean; /** * The type of information (or * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. */ infoType?: string; /** * The number of times Cloud DLP found this infoType within this job and * resource. */ infoTypeCount?: bigint; /** * Name of the inspection job, for example, * `projects/123/locations/europe/dlpJobs/i-8383929`. */ inspectJob?: string; } function serializeCloudDlpInspection(data: any): CloudDlpInspection { return { ...data, infoTypeCount: data["infoTypeCount"] !== undefined ? String(data["infoTypeCount"]) : undefined, }; } function deserializeCloudDlpInspection(data: any): CloudDlpInspection { return { ...data, infoTypeCount: data["infoTypeCount"] !== undefined ? BigInt(data["infoTypeCount"]) : undefined, }; } /** * Metadata taken from a [Cloud Logging * LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) */ export interface CloudLoggingEntry { /** * A unique identifier for the log entry. */ insertId?: string; /** * The type of the log (part of `log_name`. `log_name` is the resource name * of the log to which this log entry belongs). For example: * `cloudresourcemanager.googleapis.com/activity`. Note that this field is not * URL-encoded, unlike the `LOG_ID` field in `LogEntry`. */ logId?: string; /** * The organization, folder, or project of the monitored resource that * produced this log entry. */ resourceContainer?: string; /** * The time the event described by the log entry occurred. */ timestamp?: Date; } function serializeCloudLoggingEntry(data: any): CloudLoggingEntry { return { ...data, timestamp: data["timestamp"] !== undefined ? data["timestamp"].toISOString() : undefined, }; } function deserializeCloudLoggingEntry(data: any): CloudLoggingEntry { return { ...data, timestamp: data["timestamp"] !== undefined ? new Date(data["timestamp"]) : undefined, }; } /** * Contains compliance information about a security standard indicating unmet * recommendations. */ export interface Compliance { /** * Policies within the standard or benchmark, for example, A.12.4.1 */ ids?: string[]; /** * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and * OWASP. */ standard?: string; /** * Version of the standard or benchmark, for example, 1.1 */ version?: string; } /** * Result containing the properties and count of a ComplianceSnapshot request. */ export interface ComplianceSnapshot { /** * The category of Findings matching. */ category?: string; /** * The cloud provider for the compliance snapshot. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * The compliance standard (ie CIS). */ complianceStandard?: string; /** * The compliance version (ie 1.3) in CIS 1.3. */ complianceVersion?: string; /** * Total count of findings for the given properties. */ count?: bigint; /** * The leaf container resource name that is closest to the snapshot. */ leafContainerResource?: string; /** * The compliance snapshot name. Format: //sources//complianceSnapshots/ */ name?: string; /** * The snapshot time of the snapshot. */ snapshotTime?: Date; } function serializeComplianceSnapshot(data: any): ComplianceSnapshot { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, snapshotTime: data["snapshotTime"] !== undefined ? data["snapshotTime"].toISOString() : undefined, }; } function deserializeComplianceSnapshot(data: any): ComplianceSnapshot { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, snapshotTime: data["snapshotTime"] !== undefined ? new Date(data["snapshotTime"]) : undefined, }; } /** * Contains information about the IP connection associated with the finding. */ export interface Connection { /** * Destination IP address. Not present for sockets that are listening and not * connected. */ destinationIp?: string; /** * Destination port. Not present for sockets that are listening and not * connected. */ destinationPort?: number; /** * IANA Internet Protocol Number such as TCP(6) and UDP(17). */ protocol?: | "PROTOCOL_UNSPECIFIED" | "ICMP" | "TCP" | "UDP" | "GRE" | "ESP"; /** * Source IP address. */ sourceIp?: string; /** * Source port. */ sourcePort?: number; } /** * The email address of a contact. */ export interface Contact { /** * An email address. For example, "`person123@company.com`". */ email?: string; } /** * Details about specific contacts */ export interface ContactDetails { /** * A list of contacts */ contacts?: Contact[]; } /** * Container associated with the finding. */ export interface Container { /** * The time that the container was created. */ createTime?: Date; /** * Optional container image ID, if provided by the container runtime. * Uniquely identifies the container image launched using a container image * digest. */ imageId?: string; /** * Container labels, as provided by the container runtime. */ labels?: Label[]; /** * Name of the container. */ name?: string; /** * Container image URI provided when configuring a pod or container. This * string can identify a container image version using mutable tags. */ uri?: string; } function serializeContainer(data: any): Container { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, }; } function deserializeContainer(data: any): Container { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, }; } /** * Request message to create single resource value config */ export interface CreateResourceValueConfigRequest { /** * Required. Resource name of the new ResourceValueConfig's parent. */ parent?: string; /** * Required. The resource value config being created. */ resourceValueConfig?: GoogleCloudSecuritycenterV1ResourceValueConfig; } /** * An error encountered while validating the uploaded configuration of an Event * Threat Detection Custom Module. */ export interface CustomModuleValidationError { /** * A description of the error, suitable for human consumption. Required. */ description?: string; /** * The end position of the error in the uploaded text version of the module. * This field may be omitted if no specific position applies, or if one could * not be computed.. */ end?: Position; /** * The path, in RFC 8901 JSON Pointer format, to the field that failed * validation. This may be left empty if no specific field is affected. */ fieldPath?: string; /** * The initial position of the error in the uploaded text version of the * module. This field may be omitted if no specific position applies, or if * one could not be computed. */ start?: Position; } /** * A list of zero or more errors encountered while validating the uploaded * configuration of an Event Threat Detection Custom Module. */ export interface CustomModuleValidationErrors { errors?: CustomModuleValidationError[]; } /** * CVE stands for Common Vulnerabilities and Exposures. Information from the * [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes * this vulnerability. */ export interface Cve { /** * Describe Common Vulnerability Scoring System specified at * https://www.first.org/cvss/v3.1/specification-document */ cvssv3?: Cvssv3; /** * The exploitation activity of the vulnerability in the wild. */ exploitationActivity?: | "EXPLOITATION_ACTIVITY_UNSPECIFIED" | "WIDE" | "CONFIRMED" | "AVAILABLE" | "ANTICIPATED" | "NO_KNOWN"; /** * Date the first publicly available exploit or PoC was released. */ exploitReleaseDate?: Date; /** * Date of the earliest known exploitation. */ firstExploitationDate?: Date; /** * The unique identifier for the vulnerability. e.g. CVE-2021-34527 */ id?: string; /** * The potential impact of the vulnerability if it was to be exploited. */ impact?: | "RISK_RATING_UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"; /** * Whether or not the vulnerability has been observed in the wild. */ observedInTheWild?: boolean; /** * Additional information about the CVE. e.g. * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 */ references?: Reference[]; /** * Whether upstream fix is available for the CVE. */ upstreamFixAvailable?: boolean; /** * Whether or not the vulnerability was zero day when the finding was * published. */ zeroDay?: boolean; } function serializeCve(data: any): Cve { return { ...data, exploitReleaseDate: data["exploitReleaseDate"] !== undefined ? data["exploitReleaseDate"].toISOString() : undefined, firstExploitationDate: data["firstExploitationDate"] !== undefined ? data["firstExploitationDate"].toISOString() : undefined, }; } function deserializeCve(data: any): Cve { return { ...data, exploitReleaseDate: data["exploitReleaseDate"] !== undefined ? new Date(data["exploitReleaseDate"]) : undefined, firstExploitationDate: data["firstExploitationDate"] !== undefined ? new Date(data["firstExploitationDate"]) : undefined, }; } /** * Common Vulnerability Scoring System version 3. */ export interface Cvssv3 { /** * This metric describes the conditions beyond the attacker's control that * must exist in order to exploit the vulnerability. */ attackComplexity?: | "ATTACK_COMPLEXITY_UNSPECIFIED" | "ATTACK_COMPLEXITY_LOW" | "ATTACK_COMPLEXITY_HIGH"; /** * Base Metrics Represents the intrinsic characteristics of a vulnerability * that are constant over time and across user environments. This metric * reflects the context by which vulnerability exploitation is possible. */ attackVector?: | "ATTACK_VECTOR_UNSPECIFIED" | "ATTACK_VECTOR_NETWORK" | "ATTACK_VECTOR_ADJACENT" | "ATTACK_VECTOR_LOCAL" | "ATTACK_VECTOR_PHYSICAL"; /** * This metric measures the impact to the availability of the impacted * component resulting from a successfully exploited vulnerability. */ availabilityImpact?: | "IMPACT_UNSPECIFIED" | "IMPACT_HIGH" | "IMPACT_LOW" | "IMPACT_NONE"; /** * The base score is a function of the base metric scores. */ baseScore?: number; /** * This metric measures the impact to the confidentiality of the information * resources managed by a software component due to a successfully exploited * vulnerability. */ confidentialityImpact?: | "IMPACT_UNSPECIFIED" | "IMPACT_HIGH" | "IMPACT_LOW" | "IMPACT_NONE"; /** * This metric measures the impact to integrity of a successfully exploited * vulnerability. */ integrityImpact?: | "IMPACT_UNSPECIFIED" | "IMPACT_HIGH" | "IMPACT_LOW" | "IMPACT_NONE"; /** * This metric describes the level of privileges an attacker must possess * before successfully exploiting the vulnerability. */ privilegesRequired?: | "PRIVILEGES_REQUIRED_UNSPECIFIED" | "PRIVILEGES_REQUIRED_NONE" | "PRIVILEGES_REQUIRED_LOW" | "PRIVILEGES_REQUIRED_HIGH"; /** * The Scope metric captures whether a vulnerability in one vulnerable * component impacts resources in components beyond its security scope. */ scope?: | "SCOPE_UNSPECIFIED" | "SCOPE_UNCHANGED" | "SCOPE_CHANGED"; /** * This metric captures the requirement for a human user, other than the * attacker, to participate in the successful compromise of the vulnerable * component. */ userInteraction?: | "USER_INTERACTION_UNSPECIFIED" | "USER_INTERACTION_NONE" | "USER_INTERACTION_REQUIRED"; } /** * Details about a data access attempt made by a principal not authorized under * applicable data security policy. */ export interface DataAccessEvent { /** * Unique identifier for data access event. */ eventId?: string; /** * Timestamp of data access event. */ eventTime?: Date; /** * The operation performed by the principal to access the data. */ operation?: | "OPERATION_UNSPECIFIED" | "READ" | "MOVE" | "COPY"; /** * The email address of the principal that accessed the data. The principal * could be a user account, service account, Google group, or other. */ principalEmail?: string; } function serializeDataAccessEvent(data: any): DataAccessEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, }; } function deserializeDataAccessEvent(data: any): DataAccessEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, }; } /** * Represents database access information, such as queries. A database may be a * sub-resource of an instance (as in the case of Cloud SQL instances or Cloud * Spanner instances), or the database instance itself. Some database resources * might not have the [full resource * name](https://google.aip.dev/122#full-resource-names) populated because these * resource types, such as Cloud SQL databases, are not yet supported by Cloud * Asset Inventory. In these cases only the display name is provided. */ export interface Database { /** * The human-readable name of the database that the user connected to. */ displayName?: string; /** * The target usernames, roles, or groups of an SQL privilege grant, which is * not an IAM policy change. */ grantees?: string[]; /** * Some database resources may not have the [full resource * name](https://google.aip.dev/122#full-resource-names) populated because * these resource types are not yet supported by Cloud Asset Inventory (e.g. * Cloud SQL databases). In these cases only the display name will be * provided. The [full resource * name](https://google.aip.dev/122#full-resource-names) of the database that * the user connected to, if it is supported by Cloud Asset Inventory. */ name?: string; /** * The SQL statement that is associated with the database access. */ query?: string; /** * The username used to connect to the database. The username might not be an * IAM principal and does not have a set format. */ userName?: string; /** * The version of the database, for example, POSTGRES_14. See [the complete * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). */ version?: string; } /** * Details about a data flow event, in which either the data is moved to or is * accessed from a non-compliant geo-location, as defined in the applicable data * security policy. */ export interface DataFlowEvent { /** * Unique identifier for data flow event. */ eventId?: string; /** * Timestamp of data flow event. */ eventTime?: Date; /** * The operation performed by the principal for the data flow event. */ operation?: | "OPERATION_UNSPECIFIED" | "READ" | "MOVE" | "COPY"; /** * The email address of the principal that initiated the data flow event. The * principal could be a user account, service account, Google group, or other. */ principalEmail?: string; /** * Non-compliant location of the principal or the data destination. */ violatedLocation?: string; } function serializeDataFlowEvent(data: any): DataFlowEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, }; } function deserializeDataFlowEvent(data: any): DataFlowEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, }; } /** * Memory hash detection contributing to the binary family match. */ export interface Detection { /** * The name of the binary associated with the memory hash signature * detection. */ binary?: string; /** * The percentage of memory page hashes in the signature that were matched. */ percentPagesMatched?: number; } /** * Contains information about the disk associated with the finding. */ export interface Disk { /** * The name of the disk, for example, * "https://www.googleapis.com/compute/v1/projects/project-id/zones/zone-id/disks/disk-id". */ name?: string; } /** * Path of the file in terms of underlying disk/partition identifiers. */ export interface DiskPath { /** * UUID of the partition (format * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) */ partitionUuid?: string; /** * Relative path of the file in the partition as a JSON encoded string. * Example: /home/user1/executable_file.sh */ relativePath?: string; } /** * The record of a dynamic mute rule that matches the finding. */ export interface DynamicMuteRecord { /** * When the dynamic mute rule first matched the finding. */ matchTime?: Date; /** * The relative resource name of the mute rule, represented by a mute config, * that created this record, for example * `organizations/123/muteConfigs/mymuteconfig` or * `organizations/123/locations/global/muteConfigs/mymuteconfig`. */ muteConfig?: string; } function serializeDynamicMuteRecord(data: any): DynamicMuteRecord { return { ...data, matchTime: data["matchTime"] !== undefined ? data["matchTime"].toISOString() : undefined, }; } function deserializeDynamicMuteRecord(data: any): DynamicMuteRecord { return { ...data, matchTime: data["matchTime"] !== undefined ? new Date(data["matchTime"]) : undefined, }; } /** * An EffectiveEventThreatDetectionCustomModule is the representation of an * Event Threat Detection custom module at a specified level of the resource * hierarchy: organization, folder, or project. If a custom module is inherited * from a parent organization or folder, the value of the `enablement_state` * property in EffectiveEventThreatDetectionCustomModule is set to the value * that is effective in the parent, instead of `INHERITED`. For example, if the * module is enabled in a parent organization or folder, the effective * `enablement_state` for the module in all child folders or projects is also * `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. */ export interface EffectiveEventThreatDetectionCustomModule { /** * The cloud provider of the custom module. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * Output only. Config for the effective module. */ readonly config?: { [key: string]: any }; /** * Output only. The description for the module. */ readonly description?: string; /** * Output only. The human readable name to be displayed for the module. */ readonly displayName?: string; /** * Output only. The effective state of enablement for the module at the given * level of the hierarchy. */ readonly enablementState?: | "ENABLEMENT_STATE_UNSPECIFIED" | "ENABLED" | "DISABLED"; /** * Output only. The resource name of the effective ETD custom module. Its * format is: * * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * * * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * * * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. */ readonly name?: string; /** * Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. */ readonly type?: string; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * A name-value pair representing an environment variable used in an operating * system process. */ export interface EnvironmentVariable { /** * Environment variable name as a JSON encoded string. */ name?: string; /** * Environment variable value as a JSON encoded string. */ val?: string; } /** * Represents an instance of an Event Threat Detection custom module, including * its full module name, display name, enablement state, and last updated time. * You can create a custom module at the organization, folder, or project level. * Custom modules that you create at the organization or folder level are * inherited by child folders and projects. */ export interface EventThreatDetectionCustomModule { /** * Output only. The closest ancestor module that this module inherits the * enablement state from. The format is the same as the * EventThreatDetectionCustomModule resource name. */ readonly ancestorModule?: string; /** * The cloud provider of the custom module. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * Config for the module. For the resident module, its config value is * defined at this level. For the inherited module, its config value is * inherited from the ancestor module. */ config?: { [key: string]: any }; /** * The description for the module. */ description?: string; /** * The human readable name to be displayed for the module. */ displayName?: string; /** * The state of enablement for the module at the given level of the * hierarchy. */ enablementState?: | "ENABLEMENT_STATE_UNSPECIFIED" | "ENABLED" | "DISABLED" | "INHERITED"; /** * Output only. The editor the module was last updated by. */ readonly lastEditor?: string; /** * Immutable. The resource name of the Event Threat Detection custom module. * Its format is: * * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. */ name?: string; /** * Type for the module. e.g. CONFIGURABLE_BAD_IP. */ type?: string; /** * Output only. The time the module was last updated. */ readonly updateTime?: Date; } /** * Resource where data was exfiltrated from or exfiltrated to. */ export interface ExfilResource { /** * Subcomponents of the asset that was exfiltrated, like URIs used during * exfiltration, table names, databases, and filenames. For example, multiple * tables might have been exfiltrated from the same Cloud SQL instance, or * multiple files might have been exfiltrated from the same Cloud Storage * bucket. */ components?: string[]; /** * The resource's [full resource * name](https://cloud.google.com/apis/design/resource_names#full_resource_name). */ name?: string; } /** * Exfiltration represents a data exfiltration attempt from one or more sources * to one or more targets. The `sources` attribute lists the sources of the * exfiltrated data. The `targets` attribute lists the destinations the data was * copied to. */ export interface Exfiltration { /** * If there are multiple sources, then the data is considered "joined" * between them. For instance, BigQuery can join multiple tables, and each * table would be considered a source. */ sources?: ExfilResource[]; /** * If there are multiple targets, each target would get a complete copy of * the "joined" source data. */ targets?: ExfilResource[]; /** * Total exfiltrated bytes processed for the entire job. */ totalExfiltratedBytes?: bigint; } function serializeExfiltration(data: any): Exfiltration { return { ...data, totalExfiltratedBytes: data["totalExfiltratedBytes"] !== undefined ? String(data["totalExfiltratedBytes"]) : undefined, }; } function deserializeExfiltration(data: any): Exfiltration { return { ...data, totalExfiltratedBytes: data["totalExfiltratedBytes"] !== undefined ? BigInt(data["totalExfiltratedBytes"]) : undefined, }; } /** * Represents a textual expression in the Common Expression Language (CEL) * syntax. CEL is a C-like expression language. The syntax and semantics of CEL * are documented at https://github.com/google/cel-spec. Example (Comparison): * title: "Summary size limit" description: "Determines if a summary is less * than 100 chars" expression: "document.summary.size() < 100" Example * (Equality): title: "Requestor is owner" description: "Determines if requestor * is the document owner" expression: "document.owner == * request.auth.claims.email" Example (Logic): title: "Public documents" * description: "Determine whether the document should be publicly visible" * expression: "document.type != 'private' && document.type != 'internal'" * Example (Data Manipulation): title: "Notification string" description: * "Create a notification string with a timestamp." expression: "'New message * received at ' + string(document.create_time)" The exact variables and * functions that may be referenced within an expression are determined by the * service that evaluates it. See the service documentation for additional * information. */ export interface Expr { /** * Optional. Description of the expression. This is a longer text which * describes the expression, e.g. when hovered over it in a UI. */ description?: string; /** * Textual representation of an expression in Common Expression Language * syntax. */ expression?: string; /** * Optional. String indicating the location of the expression for error * reporting, e.g. a file name and a position in the file. */ location?: string; /** * Optional. Title for the expression, i.e. a short string describing its * purpose. This can be used e.g. in UIs which allow to enter the expression. */ title?: string; } /** * File information about the related binary/library used by an executable, or * the script used by a script interpreter */ export interface File { /** * Prefix of the file contents as a JSON-encoded string. */ contents?: string; /** * Path of the file in terms of underlying disk/partition identifiers. */ diskPath?: DiskPath; /** * The length in bytes of the file prefix that was hashed. If hashed_size == * size, any hashes reported represent the entire file. */ hashedSize?: bigint; /** * True when the hash covers only a prefix of the file. */ partiallyHashed?: boolean; /** * Absolute path of the file as a JSON encoded string. */ path?: string; /** * SHA256 hash of the first hashed_size bytes of the file encoded as a hex * string. If hashed_size == size, sha256 represents the SHA256 hash of the * entire file. */ sha256?: string; /** * Size of the file in bytes. */ size?: bigint; } function serializeFile(data: any): File { return { ...data, hashedSize: data["hashedSize"] !== undefined ? String(data["hashedSize"]) : undefined, size: data["size"] !== undefined ? String(data["size"]) : undefined, }; } function deserializeFile(data: any): File { return { ...data, hashedSize: data["hashedSize"] !== undefined ? BigInt(data["hashedSize"]) : undefined, size: data["size"] !== undefined ? BigInt(data["size"]) : undefined, }; } /** * 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 Finding { /** * Access details associated with the finding, such as more information on * the caller, which method was accessed, and from where. */ access?: Access; /** * Represents an application associated with the finding. */ application?: Application; /** * The results of an attack path simulation relevant to this finding. */ attackExposure?: AttackExposure; /** * Fields related to Backup and DR findings. */ backupDisasterRecovery?: BackupDisasterRecovery; /** * The canonical name of the finding. It's either * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", * depending on the closest CRM ancestor of the resource associated with the * finding. */ canonicalName?: string; /** * The additional taxonomy group within findings from a given source. This * field is immutable after creation time. Example: "XSS_FLASH_INJECTION" */ category?: string; /** * Fields related to Cloud Armor findings. */ cloudArmor?: CloudArmor; /** * Cloud DLP data profile that is associated with the finding. */ cloudDlpDataProfile?: CloudDlpDataProfile; /** * Cloud Data Loss Prevention (Cloud DLP) inspection results that are * associated with the finding. */ cloudDlpInspection?: CloudDlpInspection; /** * Contains compliance information for security standards associated to the * finding. */ compliances?: Compliance[]; /** * Contains information about the IP connection associated with the finding. */ connections?: Connection[]; /** * Output only. Map containing the points of contact for the given finding. * The key represents the type of contact, while the value contains a list of * all the contacts that pertain. Please refer to: * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories * { "security": { "contacts": [ { "email": "person1@company.com" }, { * "email": "person2@company.com" } ] } } */ readonly contacts?: { [key: string]: ContactDetails }; /** * Containers associated with the finding. This field provides information * for both Kubernetes and non-Kubernetes containers. */ containers?: Container[]; /** * The time at which the finding was created in Security Command Center. */ createTime?: Date; /** * Data access events associated with the finding. */ dataAccessEvents?: DataAccessEvent[]; /** * Database associated with the finding. */ database?: Database; /** * Data flow events associated with the finding. */ dataFlowEvents?: DataFlowEvent[]; /** * Contains more details about the finding. */ description?: string; /** * Disk associated with the finding. */ disk?: Disk; /** * The time the finding was first detected. If an existing finding is * updated, then this is the time the update occurred. For example, if the * finding represents an open firewall, this property captures the time the * detector believes the firewall became open. The accuracy is determined by * the detector. If the finding is later resolved, then this time reflects * when the finding was resolved. This must not be set to a value greater than * the current timestamp. */ eventTime?: Date; /** * Represents exfiltrations associated with the finding. */ exfiltration?: Exfiltration; /** * Output only. Third party SIEM/SOAR fields within SCC, contains external * system information and external system finding fields. */ readonly externalSystems?: { [key: string]: GoogleCloudSecuritycenterV1ExternalSystem }; /** * 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; /** * File associated with the finding. */ files?: File[]; /** * The class of the finding. */ findingClass?: | "FINDING_CLASS_UNSPECIFIED" | "THREAT" | "VULNERABILITY" | "MISCONFIGURATION" | "OBSERVATION" | "SCC_ERROR" | "POSTURE_VIOLATION" | "TOXIC_COMBINATION" | "SENSITIVE_DATA_RISK"; /** * Contains details about groups of which this finding is a member. A group * is a collection of findings that are related in some way. This field cannot * be updated. Its value is ignored in all update requests. */ groupMemberships?: GroupMembership[]; /** * Represents IAM bindings associated with the finding. */ iamBindings?: IamBinding[]; /** * Represents what's commonly known as an *indicator of compromise* (IoC) in * computer forensics. This is an artifact observed on a network or in an * operating system that, with high confidence, indicates a computer * intrusion. For more information, see [Indicator of * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). */ indicator?: Indicator; /** * Signature of the kernel rootkit. */ kernelRootkit?: KernelRootkit; /** * Kubernetes resources associated with the finding. */ kubernetes?: Kubernetes; /** * The load balancers associated with the finding. */ loadBalancers?: LoadBalancer[]; /** * Log entries that are relevant to the finding. */ logEntries?: LogEntry[]; /** * MITRE ATT&CK tactics and techniques related to this finding. See: * https://attack.mitre.org */ mitreAttack?: MitreAttack; /** * Unique identifier of the module which generated the finding. Example: * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 */ moduleName?: string; /** * Indicates the mute state of a finding (either muted, unmuted or * undefined). Unlike other attributes of a finding, a finding provider * shouldn't set the value of mute. */ mute?: | "MUTE_UNSPECIFIED" | "MUTED" | "UNMUTED" | "UNDEFINED"; /** * Output only. The mute information regarding this finding. */ readonly muteInfo?: MuteInfo; /** * Records additional information about the mute operation, for example, the * [mute configuration](/security-command-center/docs/how-to-mute-findings) * that muted the finding and the user who muted the finding. */ muteInitiator?: string; /** * Output only. The most recent time this finding was muted or unmuted. */ readonly muteUpdateTime?: Date; /** * The [relative resource * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) * of the finding. Example: * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". */ name?: string; /** * Steps to address the finding. */ nextSteps?: string; /** * Notebook associated with the finding. */ notebook?: Notebook; /** * Contains information about the org policies associated with the finding. */ orgPolicies?: OrgPolicy[]; /** * 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; /** * Output only. The human readable display name of the finding source such as * "Event Threat Detection" or "Security Health Analytics". */ readonly parentDisplayName?: string; /** * Represents operating system processes associated with the Finding. */ processes?: Process[]; /** * 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; /** * 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. */ readonly securityMarks?: SecurityMarks; /** * The security posture associated with the finding. */ securityPosture?: SecurityPosture; /** * The severity of the finding. This field is managed by the source that * writes the finding. */ severity?: | "SEVERITY_UNSPECIFIED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; /** * 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 }; /** * The state of the finding. */ state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "INACTIVE"; /** * Contains details about a group of security issues that, when the issues * occur together, represent a greater risk than when the issues occur * independently. A group of such issues is referred to as a toxic * combination. This field cannot be updated. Its value is ignored in all * update requests. */ toxicCombination?: ToxicCombination; /** * Represents vulnerability-specific fields like CVE and CVSS scores. CVE * stands for Common Vulnerabilities and Exposures * (https://cve.mitre.org/about/) */ vulnerability?: Vulnerability; } function serializeFinding(data: any): Finding { return { ...data, attackExposure: data["attackExposure"] !== undefined ? serializeAttackExposure(data["attackExposure"]) : undefined, backupDisasterRecovery: data["backupDisasterRecovery"] !== undefined ? serializeBackupDisasterRecovery(data["backupDisasterRecovery"]) : undefined, cloudArmor: data["cloudArmor"] !== undefined ? serializeCloudArmor(data["cloudArmor"]) : undefined, cloudDlpInspection: data["cloudDlpInspection"] !== undefined ? serializeCloudDlpInspection(data["cloudDlpInspection"]) : undefined, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (serializeContainer(item))) : undefined, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, dataAccessEvents: data["dataAccessEvents"] !== undefined ? data["dataAccessEvents"].map((item: any) => (serializeDataAccessEvent(item))) : undefined, dataFlowEvents: data["dataFlowEvents"] !== undefined ? data["dataFlowEvents"].map((item: any) => (serializeDataFlowEvent(item))) : undefined, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, exfiltration: data["exfiltration"] !== undefined ? serializeExfiltration(data["exfiltration"]) : undefined, files: data["files"] !== undefined ? data["files"].map((item: any) => (serializeFile(item))) : undefined, kubernetes: data["kubernetes"] !== undefined ? serializeKubernetes(data["kubernetes"]) : undefined, logEntries: data["logEntries"] !== undefined ? data["logEntries"].map((item: any) => (serializeLogEntry(item))) : undefined, notebook: data["notebook"] !== undefined ? serializeNotebook(data["notebook"]) : undefined, processes: data["processes"] !== undefined ? data["processes"].map((item: any) => (serializeProcess(item))) : undefined, vulnerability: data["vulnerability"] !== undefined ? serializeVulnerability(data["vulnerability"]) : undefined, }; } function deserializeFinding(data: any): Finding { return { ...data, attackExposure: data["attackExposure"] !== undefined ? deserializeAttackExposure(data["attackExposure"]) : undefined, backupDisasterRecovery: data["backupDisasterRecovery"] !== undefined ? deserializeBackupDisasterRecovery(data["backupDisasterRecovery"]) : undefined, cloudArmor: data["cloudArmor"] !== undefined ? deserializeCloudArmor(data["cloudArmor"]) : undefined, cloudDlpInspection: data["cloudDlpInspection"] !== undefined ? deserializeCloudDlpInspection(data["cloudDlpInspection"]) : undefined, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (deserializeContainer(item))) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, dataAccessEvents: data["dataAccessEvents"] !== undefined ? data["dataAccessEvents"].map((item: any) => (deserializeDataAccessEvent(item))) : undefined, dataFlowEvents: data["dataFlowEvents"] !== undefined ? data["dataFlowEvents"].map((item: any) => (deserializeDataFlowEvent(item))) : undefined, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, exfiltration: data["exfiltration"] !== undefined ? deserializeExfiltration(data["exfiltration"]) : undefined, externalSystems: data["externalSystems"] !== undefined ? Object.fromEntries(Object.entries(data["externalSystems"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudSecuritycenterV1ExternalSystem(v)]))) : undefined, files: data["files"] !== undefined ? data["files"].map((item: any) => (deserializeFile(item))) : undefined, kubernetes: data["kubernetes"] !== undefined ? deserializeKubernetes(data["kubernetes"]) : undefined, logEntries: data["logEntries"] !== undefined ? data["logEntries"].map((item: any) => (deserializeLogEntry(item))) : undefined, muteInfo: data["muteInfo"] !== undefined ? deserializeMuteInfo(data["muteInfo"]) : undefined, muteUpdateTime: data["muteUpdateTime"] !== undefined ? new Date(data["muteUpdateTime"]) : undefined, notebook: data["notebook"] !== undefined ? deserializeNotebook(data["notebook"]) : undefined, processes: data["processes"] !== undefined ? data["processes"].map((item: any) => (deserializeProcess(item))) : undefined, vulnerability: data["vulnerability"] !== undefined ? deserializeVulnerability(data["vulnerability"]) : undefined, }; } /** * Message that contains the resource name and display name of a folder * resource. */ export interface Folder { /** * Full resource name of this folder. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ resourceFolder?: string; /** * The user defined display name for this folder. */ resourceFolderDisplayName?: string; } /** * Additional options for SecurityCenter#foldersAssetsList. */ export interface FoldersAssetsListOptions { /** * When compare_duration is set, the ListAssetsResult's "state_change" * attribute is updated to indicate whether the asset was added, removed, or * remained present during the compare_duration period of time that precedes * the read_time. This is the time between (read_time - compare_duration) and * read_time. The state_change value is derived based on the presence of the * asset at the two points in time. Intermediate state changes between the two * times don't affect the result. For example, the results aren't affected if * the asset is removed and re-created again. Possible "state_change" values * when compare_duration is specified: * "ADDED": indicates that the asset was * not present at the start of compare_duration, but present at read_time. * * "REMOVED": indicates that the asset was present at the start of * compare_duration, but not present at read_time. * "ACTIVE": indicates that * the asset was present at both the start and the end of the time period * defined by compare_duration and read_time. If compare_duration is not * specified, then the only possible state_change is "UNUSED", which will be * the state_change set for all assets present at read_time. */ compareDuration?: number /* Duration */; /** * A field mask to specify the ListAssetsResult fields to be listed in the * response. An empty field mask will list all fields. */ fieldMask?: string /* FieldMask */; /** * Expression that defines the filter to apply across assets. The expression * is a list of zero or more restrictions combined via logical operators `AND` * and `OR`. Parentheses are supported, and `OR` has higher precedence than * `AND`. Restrictions have the form ` ` and may have a `-` character in front * of them to indicate negation. The fields map to those defined in the Asset * resource. Examples include: * name * * security_center_properties.resource_name * resource_properties.a_property * * security_marks.marks.marka The supported operators are: * `=` for all value * types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring * matching, for strings. The supported value types are: * string literals in * quotes. * integer literals without quotes. * boolean literals `true` and * `false` without quotes. The following are the allowed field and operator * combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: * This should be milliseconds since epoch or an RFC3339 string. Examples: * `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds * since epoch or an RFC3339 string. Examples: `create_time = * "2019-06-10T16:07:18-07:00"` `create_time = 1560208038000` * * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` For example, * `resource_properties.size = 100` is a valid filter string. Use a partial * match on the empty string to filter based on a property existing: * `resource_properties.my_property : ""` Use a negated partial match on the * empty string to filter based on a property not existing: * `-resource_properties.my_property : ""` */ filter?: string; /** * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For * example: "name,resource_properties.a_property". The default sorting order * is ascending. To specify descending order for a field, a suffix " desc" * should be appended to the field name. For example: "name * desc,resource_properties.a_property". Redundant space characters in the * syntax are insignificant. "name desc,resource_properties.a_property" and " * name desc , resource_properties.a_property " are equivalent. The following * fields are supported: name update_time resource_properties * security_marks.marks security_center_properties.resource_name * security_center_properties.resource_display_name * security_center_properties.resource_parent * security_center_properties.resource_parent_display_name * security_center_properties.resource_project * security_center_properties.resource_project_display_name * security_center_properties.resource_type */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListAssetsResponse`; indicates that this * is a continuation of a prior `ListAssets` call, and that the system should * return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering assets. The filter is * limited to assets existing at the supplied time and their values are those * at that specific time. Absence of this field will default to the API's * version of NOW. */ readTime?: Date; } function serializeFoldersAssetsListOptions(data: any): FoldersAssetsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeFoldersAssetsListOptions(data: any): FoldersAssetsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Additional options for SecurityCenter#foldersAssetsUpdateSecurityMarks. */ export interface FoldersAssetsUpdateSecurityMarksOptions { /** * The time at which the updated SecurityMarks take effect. If not set uses * current server time. Updates will be applied to the SecurityMarks that are * active immediately preceding this time. Must be earlier or equal to the * server time. */ startTime?: Date; /** * The FieldMask to use when updating the security marks resource. The field * mask must not contain duplicate fields. If empty or set to "marks", all * marks will be replaced. Individual marks can be updated using "marks.". */ updateMask?: string /* FieldMask */; } function serializeFoldersAssetsUpdateSecurityMarksOptions(data: any): FoldersAssetsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersAssetsUpdateSecurityMarksOptions(data: any): FoldersAssetsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#foldersBigQueryExportsCreate. */ export interface FoldersBigQueryExportsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must consist of only lowercase letters, numbers, and hyphens, * must start with a letter, must end with either a letter or a number, and * must be 63 characters or less. */ bigQueryExportId?: string; } /** * Additional options for SecurityCenter#foldersBigQueryExportsList. */ export interface FoldersBigQueryExportsListOptions { /** * The maximum number of configs to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListBigQueryExports` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListBigQueryExports` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for SecurityCenter#foldersBigQueryExportsPatch. */ export interface FoldersBigQueryExportsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersBigQueryExportsPatchOptions(data: any): FoldersBigQueryExportsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersBigQueryExportsPatchOptions(data: any): FoldersBigQueryExportsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#foldersEventThreatDetectionSettingsCustomModulesListDescendant. */ export interface FoldersEventThreatDetectionSettingsCustomModulesListDescendantOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListDescendantEventThreatDetectionCustomModules` must match * the call that provided the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#foldersEventThreatDetectionSettingsCustomModulesList. */ export interface FoldersEventThreatDetectionSettingsCustomModulesListOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListEventThreatDetectionCustomModules` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#foldersEventThreatDetectionSettingsCustomModulesPatch. */ export interface FoldersEventThreatDetectionSettingsCustomModulesPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersEventThreatDetectionSettingsCustomModulesPatchOptions(data: any): FoldersEventThreatDetectionSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersEventThreatDetectionSettingsCustomModulesPatchOptions(data: any): FoldersEventThreatDetectionSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#foldersEventThreatDetectionSettingsEffectiveCustomModulesList. */ export interface FoldersEventThreatDetectionSettingsEffectiveCustomModulesListOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListEffectiveEventThreatDetectionCustomModules` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for SecurityCenter#foldersLocationsMuteConfigsPatch. */ export interface FoldersLocationsMuteConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersLocationsMuteConfigsPatchOptions(data: any): FoldersLocationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersLocationsMuteConfigsPatchOptions(data: any): FoldersLocationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#foldersMuteConfigsCreate. */ export interface FoldersMuteConfigsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must consist of only lowercase letters, numbers, and hyphens, * must start with a letter, must end with either a letter or a number, and * must be 63 characters or less. */ muteConfigId?: string; } /** * Additional options for SecurityCenter#foldersMuteConfigsList. */ export interface FoldersMuteConfigsListOptions { /** * The maximum number of configs to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListMuteConfigs` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListMuteConfigs` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for SecurityCenter#foldersMuteConfigsPatch. */ export interface FoldersMuteConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersMuteConfigsPatchOptions(data: any): FoldersMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersMuteConfigsPatchOptions(data: any): FoldersMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#foldersNotificationConfigsCreate. */ export interface FoldersNotificationConfigsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must be between 1 and 128 characters and contain alphanumeric * characters, underscores, or hyphens only. */ configId?: string; } /** * Additional options for SecurityCenter#foldersNotificationConfigsList. */ export interface FoldersNotificationConfigsListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListNotificationConfigsResponse`; * indicates that this is a continuation of a prior `ListNotificationConfigs` * call, and that the system should return the next page of data. */ pageToken?: string; } /** * Additional options for SecurityCenter#foldersNotificationConfigsPatch. */ export interface FoldersNotificationConfigsPatchOptions { /** * The FieldMask to use when updating the notification config. If empty all * mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersNotificationConfigsPatchOptions(data: any): FoldersNotificationConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersNotificationConfigsPatchOptions(data: any): FoldersNotificationConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#foldersSecurityHealthAnalyticsSettingsCustomModulesListDescendant. */ export interface FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#foldersSecurityHealthAnalyticsSettingsCustomModulesList. */ export interface FoldersSecurityHealthAnalyticsSettingsCustomModulesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#foldersSecurityHealthAnalyticsSettingsCustomModulesPatch. */ export interface FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { /** * The list of fields to be updated. The only fields that can be updated are * `enablement_state` and `custom_config`. If empty or set to the wildcard * value `*`, both `enablement_state` and `custom_config` are updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(data: any): FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(data: any): FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#foldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesList. */ export interface FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#foldersSourcesFindingsExternalSystemsPatch. */ export interface FoldersSourcesFindingsExternalSystemsPatchOptions { /** * The FieldMask to use when updating the external system resource. If empty * all mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeFoldersSourcesFindingsExternalSystemsPatchOptions(data: any): FoldersSourcesFindingsExternalSystemsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersSourcesFindingsExternalSystemsPatchOptions(data: any): FoldersSourcesFindingsExternalSystemsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#foldersSourcesFindingsList. */ export interface FoldersSourcesFindingsListOptions { /** * When compare_duration is set, the ListFindingsResult's "state_change" * attribute is updated to indicate whether the finding had its state changed, * the finding's state remained unchanged, or if the finding was added in any * state during the compare_duration period of time that precedes the * read_time. This is the time between (read_time - compare_duration) and * read_time. The state_change value is derived based on the presence and * state of the finding at the two points in time. Intermediate state changes * between the two times don't affect the result. For example, the results * aren't affected if the finding is made inactive and then active again. * Possible "state_change" values when compare_duration is specified: * * "CHANGED": indicates that the finding was present and matched the given * filter at the start of compare_duration, but changed its state at * read_time. * "UNCHANGED": indicates that the finding was present and * matched the given filter at the start of compare_duration and did not * change state at read_time. * "ADDED": indicates that the finding did not * match the given filter or was not present at the start of compare_duration, * but was present at read_time. * "REMOVED": indicates that the finding was * present and matched the filter at the start of compare_duration, but did * not match the filter at read_time. If compare_duration is not specified, * then the only possible state_change is "UNUSED", which will be the * state_change set for all findings present at read_time. */ compareDuration?: number /* Duration */; /** * A field mask to specify the Finding fields to be listed in the response. * An empty field mask will list all fields. */ fieldMask?: string /* FieldMask */; /** * Expression that defines the filter to apply across findings. The * expression is a list of one or more restrictions combined via logical * operators `AND` and `OR`. Parentheses are supported, and `OR` has higher * precedence than `AND`. Restrictions have the form ` ` and may have a `-` * character in front of them to indicate negation. Examples include: * name * * source_properties.a_property * security_marks.marks.marka The supported * operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for * integer values. * `:`, meaning substring matching, for strings. The * supported value types are: * string literals in quotes. * integer literals * without quotes. * boolean literals `true` and `false` without quotes. The * following field and operator combinations are supported: * name: `=` * * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: * `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time = * 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` For example, `source_properties.size = 100` is a valid filter * string. Use a partial match on the empty string to filter based on a * property existing: `source_properties.my_property : ""` Use a negated * partial match on the empty string to filter based on a property not * existing: `-source_properties.my_property : ""` * resource: * * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, * `:` */ filter?: string; /** * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For * example: "name,resource_properties.a_property". The default sorting order * is ascending. To specify descending order for a field, a suffix " desc" * should be appended to the field name. For example: "name * desc,source_properties.a_property". Redundant space characters in the * syntax are insignificant. "name desc,source_properties.a_property" and " * name desc , source_properties.a_property " are equivalent. The following * fields are supported: name parent state category resource_name event_time * source_properties security_marks.marks */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListFindingsResponse`; indicates that this * is a continuation of a prior `ListFindings` call, and that the system * should return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. */ readTime?: Date; } function serializeFoldersSourcesFindingsListOptions(data: any): FoldersSourcesFindingsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeFoldersSourcesFindingsListOptions(data: any): FoldersSourcesFindingsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Additional options for SecurityCenter#foldersSourcesFindingsPatch. */ export interface FoldersSourcesFindingsPatchOptions { /** * The FieldMask to use when updating the finding resource. This field should * not be specified when creating a finding. When updating a finding, an empty * mask is treated as updating all mutable fields and replacing * source_properties. Individual source_properties can be added/updated by * using "source_properties." in the field mask. */ updateMask?: string /* FieldMask */; } function serializeFoldersSourcesFindingsPatchOptions(data: any): FoldersSourcesFindingsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersSourcesFindingsPatchOptions(data: any): FoldersSourcesFindingsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#foldersSourcesFindingsUpdateSecurityMarks. */ export interface FoldersSourcesFindingsUpdateSecurityMarksOptions { /** * The time at which the updated SecurityMarks take effect. If not set uses * current server time. Updates will be applied to the SecurityMarks that are * active immediately preceding this time. Must be earlier or equal to the * server time. */ startTime?: Date; /** * The FieldMask to use when updating the security marks resource. The field * mask must not contain duplicate fields. If empty or set to "marks", all * marks will be replaced. Individual marks can be updated using "marks.". */ updateMask?: string /* FieldMask */; } function serializeFoldersSourcesFindingsUpdateSecurityMarksOptions(data: any): FoldersSourcesFindingsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeFoldersSourcesFindingsUpdateSecurityMarksOptions(data: any): FoldersSourcesFindingsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#foldersSourcesList. */ export interface FoldersSourcesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListSourcesResponse`; indicates that this * is a continuation of a prior `ListSources` call, and that the system should * return the next page of data. */ pageToken?: string; } /** * GCP metadata associated with the resource, only applicable if the finding's * cloud provider is Google Cloud Platform. */ export interface GcpMetadata { /** * 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. */ readonly folders?: GoogleCloudSecuritycenterV2Folder[]; /** * The name of the organization that the resource belongs to. */ organization?: string; /** * The full resource name of resource's parent. */ parent?: string; /** * The human readable name of resource's parent. */ parentDisplayName?: string; /** * The full resource name of project that the resource belongs to. */ project?: string; /** * The project ID that the resource belongs to. */ projectDisplayName?: string; } /** * Represents a geographical location for a given access. */ export interface Geolocation { /** * A CLDR. */ regionCode?: string; } /** * Request message for `GetIamPolicy` method. */ export interface GetIamPolicyRequest { /** * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. */ options?: GetPolicyOptions; } /** * Encapsulates settings provided to GetIamPolicy. */ export interface GetPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ requestedPolicyVersion?: number; } /** * Response of asset discovery run */ export interface GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse { /** * The duration between asset discovery run start and end */ duration?: number /* Duration */; /** * The state of an asset discovery run. */ state?: | "STATE_UNSPECIFIED" | "COMPLETED" | "SUPERSEDED" | "TERMINATED"; } function serializeGoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse(data: any): GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } function deserializeGoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse(data: any): GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } /** * Configures how to deliver Findings to BigQuery Instance. */ export interface GoogleCloudSecuritycenterV1BigQueryExport { /** * Output only. The time at which the BigQuery export was created. This field * is set by the server and will be ignored if provided on export on creation. */ readonly createTime?: Date; /** * The dataset to write findings' updates to. Its format is * "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery Dataset * unique ID must contain only letters (a-z, A-Z), numbers (0-9), or * underscores (_). */ dataset?: string; /** * The description of the export (max of 1024 characters). */ description?: string; /** * Expression that defines the filter to apply across create/update events of * findings. The expression is a list of zero or more restrictions combined * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` * has higher precedence than `AND`. Restrictions have the form ` ` and may * have a `-` character in front of them to indicate negation. The fields map * to those defined in the corresponding resource. The supported operators * are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * * `:`, meaning substring matching, for strings. The supported value types * are: * string literals in quotes. * integer literals without quotes. * * boolean literals `true` and `false` without quotes. */ filter?: string; /** * Output only. Email address of the user who last edited the BigQuery * export. This field is set by the server and will be ignored if provided on * export creation or update. */ readonly mostRecentEditor?: string; /** * The relative resource name of this export. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name. * Example format: * "organizations/{organization_id}/bigQueryExports/{export_id}" Example * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: * "projects/{project_id}/bigQueryExports/{export_id}" This field is provided * in responses, and is ignored when provided in create requests. */ name?: string; /** * Output only. The service account that needs permission to create table and * upload data to the BigQuery dataset. */ readonly principal?: string; /** * Output only. The most recent time at which the BigQuery export was * updated. This field is set by the server and will be ignored if provided on * export creation or update. */ readonly updateTime?: Date; } /** * Represents a Kubernetes RoleBinding or ClusterRoleBinding. */ export interface GoogleCloudSecuritycenterV1Binding { /** * Name for the binding. */ name?: string; /** * Namespace for the binding. */ ns?: string; /** * The Role or ClusterRole referenced by the binding. */ role?: Role; /** * Represents one or more subjects that are bound to the role. Not always * available for PATCH requests. */ subjects?: Subject[]; } /** * The response to a BulkMute request. Contains the LRO information. */ export interface GoogleCloudSecuritycenterV1BulkMuteFindingsResponse { } /** * Defines the properties in a custom module configuration for Security Health * Analytics. Use the custom module configuration to create custom detectors * that generate custom findings for resources that you specify. */ export interface GoogleCloudSecuritycenterV1CustomConfig { /** * Custom output properties. */ customOutput?: GoogleCloudSecuritycenterV1CustomOutputSpec; /** * Text that describes the vulnerability or misconfiguration that the custom * module detects. This explanation is returned with each finding instance to * help investigators understand the detected issue. The text must be enclosed * in quotation marks. */ description?: string; /** * The CEL expression to evaluate to produce findings. When the expression * evaluates to true against a resource, a finding is generated. */ predicate?: Expr; /** * An explanation of the recommended steps that security teams can take to * resolve the detected issue. This explanation is returned with each finding * generated by this module in the `nextSteps` property of the finding JSON. */ recommendation?: string; /** * The resource types that the custom module operates on. Each custom module * can specify up to 5 resource types. */ resourceSelector?: GoogleCloudSecuritycenterV1ResourceSelector; /** * The severity to assign to findings generated by the module. */ severity?: | "SEVERITY_UNSPECIFIED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; } /** * A set of optional name-value pairs that define custom source properties to * return with each finding that is generated by the custom module. The custom * source properties that are defined here are included in the finding JSON * under `sourceProperties`. */ export interface GoogleCloudSecuritycenterV1CustomOutputSpec { /** * A list of custom output properties to add to the finding. */ properties?: GoogleCloudSecuritycenterV1Property[]; } /** * An EffectiveSecurityHealthAnalyticsCustomModule is the representation of a * Security Health Analytics custom module at a specified level of the resource * hierarchy: organization, folder, or project. If a custom module is inherited * from a parent organization or folder, the value of the `enablementState` * property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value * that is effective in the parent, instead of `INHERITED`. For example, if the * module is enabled in a parent organization or folder, the effective * enablement_state for the module in all child folders or projects is also * `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. */ export interface GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule { /** * The cloud provider of the custom module. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * Output only. The user-specified configuration for the module. */ readonly customConfig?: GoogleCloudSecuritycenterV1CustomConfig; /** * Output only. The display name for the custom module. The name must be * between 1 and 128 characters, start with a lowercase letter, and contain * alphanumeric characters or underscores only. */ readonly displayName?: string; /** * Output only. The effective state of enablement for the module at the given * level of the hierarchy. */ readonly enablementState?: | "ENABLEMENT_STATE_UNSPECIFIED" | "ENABLED" | "DISABLED"; /** * Output only. The resource name of the custom module. Its format is * "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", * or * "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", * or * "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" */ readonly name?: string; } /** * Representation of third party SIEM/SOAR fields within SCC. */ export interface GoogleCloudSecuritycenterV1ExternalSystem { /** * References primary/secondary etc assignees in the external system. */ assignees?: string[]; /** * The time when the case was closed, as reported by the external system. */ caseCloseTime?: Date; /** * The time when the case was created, as reported by the external system. */ caseCreateTime?: Date; /** * The priority of the finding's corresponding case in the external system. */ casePriority?: string; /** * The SLA of the finding's corresponding case in the external system. */ caseSla?: Date; /** * The link to the finding's corresponding case in the external system. */ caseUri?: string; /** * The time when the case was last updated, as reported by the external * system. */ externalSystemUpdateTime?: Date; /** * The identifier that's used to track the finding's corresponding case in * the external system. */ externalUid?: string; /** * Full resource name of the external system, for example: * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", * "folders/1234/sources/5678/findings/123456/externalSystems/jira", * "projects/1234/sources/5678/findings/123456/externalSystems/jira" */ name?: string; /** * The most recent status of the finding's corresponding case, as reported by * the external system. */ status?: string; /** * Information about the ticket, if any, that is being used to track the * resolution of the issue that is identified by this finding. */ ticketInfo?: TicketInfo; } function serializeGoogleCloudSecuritycenterV1ExternalSystem(data: any): GoogleCloudSecuritycenterV1ExternalSystem { return { ...data, caseCloseTime: data["caseCloseTime"] !== undefined ? data["caseCloseTime"].toISOString() : undefined, caseCreateTime: data["caseCreateTime"] !== undefined ? data["caseCreateTime"].toISOString() : undefined, caseSla: data["caseSla"] !== undefined ? data["caseSla"].toISOString() : undefined, externalSystemUpdateTime: data["externalSystemUpdateTime"] !== undefined ? data["externalSystemUpdateTime"].toISOString() : undefined, ticketInfo: data["ticketInfo"] !== undefined ? serializeTicketInfo(data["ticketInfo"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV1ExternalSystem(data: any): GoogleCloudSecuritycenterV1ExternalSystem { return { ...data, caseCloseTime: data["caseCloseTime"] !== undefined ? new Date(data["caseCloseTime"]) : undefined, caseCreateTime: data["caseCreateTime"] !== undefined ? new Date(data["caseCreateTime"]) : undefined, caseSla: data["caseSla"] !== undefined ? new Date(data["caseSla"]) : undefined, externalSystemUpdateTime: data["externalSystemUpdateTime"] !== undefined ? new Date(data["externalSystemUpdateTime"]) : undefined, ticketInfo: data["ticketInfo"] !== undefined ? deserializeTicketInfo(data["ticketInfo"]) : undefined, }; } /** * A mute config is a Cloud SCC resource that contains the configuration to * mute create/update events of findings. */ export interface GoogleCloudSecuritycenterV1MuteConfig { /** * Output only. The time at which the mute config was created. This field is * set by the server and will be ignored if provided on config creation. */ readonly createTime?: Date; /** * A description of the mute config. */ description?: string; /** * The human readable name to be displayed for the mute config. */ displayName?: string; /** * Optional. The expiry of the mute config. Only applicable for dynamic * configs. If the expiry is set, when the config expires, it is removed from * all findings. */ expiryTime?: Date; /** * Required. An expression that defines the filter to apply across * create/update events of findings. While creating a filter string, be * mindful of the scope in which the mute configuration is being created. * E.g., If a filter contains project = X but is created under the project = Y * scope, it might not match any findings. The following field and operator * combinations are supported: * severity: `=`, `:` * category: `=`, `:` * * resource.name: `=`, `:` * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: * `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: * `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:` */ filter?: string; /** * Output only. Email address of the user who last edited the mute config. * This field is set by the server and will be ignored if provided on config * creation or update. */ readonly mostRecentEditor?: string; /** * This field will be ignored if provided on config creation. Format * `organizations/{organization}/muteConfigs/{mute_config}` * `folders/{folder}/muteConfigs/{mute_config}` * `projects/{project}/muteConfigs/{mute_config}` * `organizations/{organization}/locations/global/muteConfigs/{mute_config}` * `folders/{folder}/locations/global/muteConfigs/{mute_config}` * `projects/{project}/locations/global/muteConfigs/{mute_config}` */ name?: string; /** * Optional. The type of the mute config, which determines what type of mute * state the config affects. The static mute state takes precedence over the * dynamic mute state. Immutable after creation. STATIC by default if not set * during creation. */ type?: | "MUTE_CONFIG_TYPE_UNSPECIFIED" | "STATIC" | "DYNAMIC"; /** * Output only. The most recent time at which the mute config was updated. * This field is set by the server and will be ignored if provided on config * creation or update. */ readonly updateTime?: Date; } function serializeGoogleCloudSecuritycenterV1MuteConfig(data: any): GoogleCloudSecuritycenterV1MuteConfig { return { ...data, expiryTime: data["expiryTime"] !== undefined ? data["expiryTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV1MuteConfig(data: any): GoogleCloudSecuritycenterV1MuteConfig { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, expiryTime: data["expiryTime"] !== undefined ? new Date(data["expiryTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Cloud SCC's Notification */ export interface GoogleCloudSecuritycenterV1NotificationMessage { /** * If it's a Finding based notification config, this field will be populated. */ finding?: Finding; /** * Name of the notification config that generated current notification. */ notificationConfigName?: string; /** * The Cloud resource tied to this notification's Finding. */ resource?: GoogleCloudSecuritycenterV1Resource; } function serializeGoogleCloudSecuritycenterV1NotificationMessage(data: any): GoogleCloudSecuritycenterV1NotificationMessage { return { ...data, finding: data["finding"] !== undefined ? serializeFinding(data["finding"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV1NotificationMessage(data: any): GoogleCloudSecuritycenterV1NotificationMessage { return { ...data, finding: data["finding"] !== undefined ? deserializeFinding(data["finding"]) : undefined, }; } /** * 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 GoogleCloudSecuritycenterV1p1beta1Finding { /** * The canonical name of the finding. It's either * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", * depending on the closest CRM ancestor of the resource associated with the * finding. */ canonicalName?: string; /** * The additional taxonomy group within findings from a given source. This * field is immutable after creation time. Example: "XSS_FLASH_INJECTION" */ category?: string; /** * The time at which the finding was created in Security Command Center. */ createTime?: Date; /** * 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. Must not * be set to a value greater than the current timestamp. */ eventTime?: Date; /** * 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; /** * 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; /** * 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; /** * 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; /** * 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. */ readonly securityMarks?: GoogleCloudSecuritycenterV1p1beta1SecurityMarks; /** * The severity of the finding. This field is managed by the source that * writes the finding. */ severity?: | "SEVERITY_UNSPECIFIED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; /** * 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 }; /** * The state of the finding. */ state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "INACTIVE"; } function serializeGoogleCloudSecuritycenterV1p1beta1Finding(data: any): GoogleCloudSecuritycenterV1p1beta1Finding { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV1p1beta1Finding(data: any): GoogleCloudSecuritycenterV1p1beta1Finding { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, }; } /** * Message that contains the resource name and display name of a folder * resource. */ export interface GoogleCloudSecuritycenterV1p1beta1Folder { /** * Full resource name of this folder. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ resourceFolder?: string; /** * The user defined display name for this folder. */ resourceFolderDisplayName?: string; } /** * Security Command Center's Notification */ export interface GoogleCloudSecuritycenterV1p1beta1NotificationMessage { /** * If it's a Finding based notification config, this field will be populated. */ finding?: GoogleCloudSecuritycenterV1p1beta1Finding; /** * Name of the notification config that generated current notification. */ notificationConfigName?: string; /** * The Cloud resource tied to the notification. */ resource?: GoogleCloudSecuritycenterV1p1beta1Resource; } function serializeGoogleCloudSecuritycenterV1p1beta1NotificationMessage(data: any): GoogleCloudSecuritycenterV1p1beta1NotificationMessage { return { ...data, finding: data["finding"] !== undefined ? serializeGoogleCloudSecuritycenterV1p1beta1Finding(data["finding"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV1p1beta1NotificationMessage(data: any): GoogleCloudSecuritycenterV1p1beta1NotificationMessage { return { ...data, finding: data["finding"] !== undefined ? deserializeGoogleCloudSecuritycenterV1p1beta1Finding(data["finding"]) : undefined, }; } /** * Information related to the Google Cloud resource. */ export interface 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. */ readonly folders?: GoogleCloudSecuritycenterV1p1beta1Folder[]; /** * The full resource name of the resource. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ name?: string; /** * The full resource name of resource's parent. */ parent?: string; /** * The human readable name of resource's parent. */ parentDisplayName?: string; /** * The full resource name of project that the resource belongs to. */ project?: string; /** * The project id that the resource belongs to. */ projectDisplayName?: string; } /** * Response of asset discovery run */ export interface GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse { /** * The duration between asset discovery run start and end */ duration?: number /* Duration */; /** * The state of an asset discovery run. */ state?: | "STATE_UNSPECIFIED" | "COMPLETED" | "SUPERSEDED" | "TERMINATED"; } function serializeGoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse(data: any): GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } function deserializeGoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse(data: any): GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } /** * 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 GoogleCloudSecuritycenterV1p1beta1SecurityMarks { /** * The canonical name of the marks. Examples: * "organizations/{organization_id}/assets/{asset_id}/securityMarks" * "folders/{folder_id}/assets/{asset_id}/securityMarks" * "projects/{project_number}/assets/{asset_id}/securityMarks" * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" */ canonicalName?: string; /** * 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 }; /** * 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; } /** * An individual name-value pair that defines a custom source property. */ export interface GoogleCloudSecuritycenterV1Property { /** * Name of the property for the custom output. */ name?: string; /** * The CEL expression for the custom output. A resource property can be * specified to return the value of the property or a text string enclosed in * quotation marks. */ valueExpression?: Expr; } /** * Information related to the Google Cloud resource. */ export interface GoogleCloudSecuritycenterV1Resource { /** * The AWS metadata associated with the finding. */ awsMetadata?: AwsMetadata; /** * The Azure metadata associated with the finding. */ azureMetadata?: AzureMetadata; /** * Indicates which cloud provider the resource resides in. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * The human readable name of the resource. */ displayName?: string; /** * 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. */ readonly folders?: Folder[]; /** * The region or location of the service (if applicable). */ location?: string; /** * The full resource name of the resource. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ name?: string; /** * Indicates which organization or tenant in the cloud provider the finding * applies to. */ organization?: string; /** * The full resource name of resource's parent. */ parent?: string; /** * The human readable name of resource's parent. */ parentDisplayName?: string; /** * The full resource name of project that the resource belongs to. */ project?: string; /** * The project ID that the resource belongs to. */ projectDisplayName?: string; /** * Provides the path to the resource within the resource hierarchy. */ resourcePath?: ResourcePath; /** * A string representation of the resource path. For Google Cloud, it has the * format of * `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` * where there can be any number of folders. For AWS, it has the format of * `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` * where there can be any number of organizational units. For Azure, it has * the format of * `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` * where there can be any number of management groups. */ resourcePathString?: string; /** * The parent service or product from which the resource is provided, for * example, GKE or SNS. */ service?: string; /** * The full resource type of the resource. */ type?: string; } /** * Resource for selecting resource type. */ export interface GoogleCloudSecuritycenterV1ResourceSelector { /** * The resource types to run the detector on. */ resourceTypes?: string[]; } /** * A resource value configuration (RVC) is a mapping configuration of user's * resources to resource values. Used in Attack path simulations. */ export interface GoogleCloudSecuritycenterV1ResourceValueConfig { /** * Cloud provider this configuration applies to */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * Output only. Timestamp this resource value configuration was created. */ readonly createTime?: Date; /** * Description of the resource value configuration. */ description?: string; /** * Name for the resource value configuration */ name?: string; /** * List of resource labels to search for, evaluated with `AND`. For example, * `"resource_labels_selector": {"key": "value", "env": "prod"}` will match * resources with labels "key": "value" `AND` "env": "prod" * https://cloud.google.com/resource-manager/docs/creating-managing-labels */ resourceLabelsSelector?: { [key: string]: string }; /** * Apply resource_value only to resources that match resource_type. * resource_type will be checked with `AND` of other resources. For example, * "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply * "HIGH" value only to "storage.googleapis.com/Bucket" resources. */ resourceType?: string; /** * Required. Resource value level this expression represents */ resourceValue?: | "RESOURCE_VALUE_UNSPECIFIED" | "HIGH" | "MEDIUM" | "LOW" | "NONE"; /** * Project or folder to scope this configuration to. For example, * "project/456" would apply this configuration only to resources in * "project/456" scope will be checked with `AND` of other resources. */ scope?: string; /** * A mapping of the sensitivity on Sensitive Data Protection finding to * resource values. This mapping can only be used in combination with a * resource_type that is related to BigQuery, e.g. * "bigquery.googleapis.com/Dataset". */ sensitiveDataProtectionMapping?: GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping; /** * Required. Tag values combined with `AND` to check against. For Google * Cloud resources, they are tag value IDs in the form of "tagValues/123". * Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` * https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing */ tagValues?: string[]; /** * Output only. Timestamp this resource value configuration was last updated. */ readonly updateTime?: Date; } /** * Response of asset discovery run */ export interface GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse { /** * The duration between asset discovery run start and end */ duration?: number /* Duration */; /** * The state of an asset discovery run. */ state?: | "STATE_UNSPECIFIED" | "COMPLETED" | "SUPERSEDED" | "TERMINATED"; } function serializeGoogleCloudSecuritycenterV1RunAssetDiscoveryResponse(data: any): GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } function deserializeGoogleCloudSecuritycenterV1RunAssetDiscoveryResponse(data: any): GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } /** * Represents an instance of a Security Health Analytics custom module, * including its full module name, display name, enablement state, and last * updated time. You can create a custom module at the organization, folder, or * project level. Custom modules that you create at the organization or folder * level are inherited by the child folders and projects. */ export interface GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule { /** * Output only. If empty, indicates that the custom module was created in the * organization, folder, or project in which you are viewing the custom * module. Otherwise, `ancestor_module` specifies the organization or folder * from which the custom module is inherited. */ readonly ancestorModule?: string; /** * The cloud provider of the custom module. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * The user specified custom configuration for the module. */ customConfig?: GoogleCloudSecuritycenterV1CustomConfig; /** * The display name of the Security Health Analytics custom module. This * display name becomes the finding category for all findings that are * returned by this custom module. The display name must be between 1 and 128 * characters, start with a lowercase letter, and contain alphanumeric * characters or underscores only. */ displayName?: string; /** * The enablement state of the custom module. */ enablementState?: | "ENABLEMENT_STATE_UNSPECIFIED" | "ENABLED" | "DISABLED" | "INHERITED"; /** * Output only. The editor that last updated the custom module. */ readonly lastEditor?: string; /** * Immutable. The resource name of the custom module. Its format is * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", * or * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", * or * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" * The id {customModule} is server-generated and is not user settable. It will * be a numeric id containing 1-20 digits. */ name?: string; /** * Output only. The time at which the custom module was last updated. */ readonly updateTime?: Date; } /** * Resource value mapping for Sensitive Data Protection findings. If any of * these mappings have a resource value that is not unspecified, the * resource_value field will be ignored when reading this configuration. */ export interface GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping { /** * Resource value mapping for high-sensitivity Sensitive Data Protection * findings */ highSensitivityMapping?: | "RESOURCE_VALUE_UNSPECIFIED" | "HIGH" | "MEDIUM" | "LOW" | "NONE"; /** * Resource value mapping for medium-sensitivity Sensitive Data Protection * findings */ mediumSensitivityMapping?: | "RESOURCE_VALUE_UNSPECIFIED" | "HIGH" | "MEDIUM" | "LOW" | "NONE"; } /** * Represents an access event. */ export interface GoogleCloudSecuritycenterV2Access { /** * Caller's IP address, such as "1.1.1.1". */ callerIp?: string; /** * The caller IP's geolocation, which identifies where the call came from. */ callerIpGeo?: GoogleCloudSecuritycenterV2Geolocation; /** * The method that the service account called, e.g. "SetIamPolicy". */ methodName?: string; /** * Associated email, such as "foo@google.com". The email address of the * authenticated user or a service account acting on behalf of a third party * principal making the request. For third party identity callers, the * `principal_subject` field is populated instead of this field. For privacy * reasons, the principal email address is sometimes redacted. For more * information, see [Caller identities in audit * logs](https://cloud.google.com/logging/docs/audit#user-id). */ principalEmail?: string; /** * A string that represents the principal_subject that is associated with the * identity. Unlike `principal_email`, `principal_subject` supports principals * that aren't associated with email addresses, such as third party * principals. For most identities, the format is * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, * still use the legacy format `serviceAccount:{identity pool * name}[{subject}]`. */ principalSubject?: string; /** * The identity delegation history of an authenticated service account that * made the request. The `serviceAccountDelegationInfo[]` object contains * information about the real authorities that try to access Google Cloud * resources by delegating on a service account. When multiple authorities are * present, they are guaranteed to be sorted based on the original ordering of * the identity delegation events. */ serviceAccountDelegationInfo?: GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo[]; /** * The name of the service account key that was used to create or exchange * credentials when authenticating the service account that made the request. * This is a scheme-less URI full resource name. For example: * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}". * */ serviceAccountKeyName?: string; /** * This is the API service that the service account made a call to, e.g. * "iam.googleapis.com" */ serviceName?: string; /** * The caller's user agent string associated with the finding. */ userAgent?: string; /** * Type of user agent associated with the finding. For example, an operating * system shell or an embedded or standalone application. */ userAgentFamily?: string; /** * A string that represents a username. The username provided depends on the * type of the finding and is likely not an IAM principal. For example, this * can be a system username if the finding is related to a virtual machine, or * it can be an application login username. */ userName?: string; } /** * Conveys information about a Kubernetes access review (such as one returned * by a [`kubectl auth * can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) * command) that was involved in a finding. */ export interface GoogleCloudSecuritycenterV2AccessReview { /** * The API group of the resource. "*" means all. */ group?: string; /** * The name of the resource being requested. Empty means all. */ name?: string; /** * Namespace of the action being requested. Currently, there is no * distinction between no namespace and all namespaces. Both are represented * by "" (empty). */ ns?: string; /** * The optional resource type requested. "*" means all. */ resource?: string; /** * The optional subresource type. */ subresource?: string; /** * A Kubernetes resource API verb, like get, list, watch, create, update, * delete, proxy. "*" means all. */ verb?: string; /** * The API version of the resource. "*" means all. */ version?: string; } /** * Information about [Google Cloud Armor Adaptive * Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). */ export interface GoogleCloudSecuritycenterV2AdaptiveProtection { /** * A score of 0 means that there is low confidence that the detected event is * an actual attack. A score of 1 means that there is high confidence that the * detected event is an attack. See the [Adaptive Protection * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) * for further explanation. */ confidence?: number; } /** * Represents an application associated with a finding. */ export interface GoogleCloudSecuritycenterV2Application { /** * The base URI that identifies the network location of the application in * which the vulnerability was detected. For example, `http://example.com`. */ baseUri?: string; /** * The full URI with payload that could be used to reproduce the * vulnerability. For example, `http://example.com?p=aMmYgI6H`. */ fullUri?: string; } /** * Information about DDoS attack volume and classification. */ export interface GoogleCloudSecuritycenterV2Attack { /** * Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. */ classification?: string; /** * Total BPS (bytes per second) volume of attack. */ volumeBps?: number; /** * Total PPS (packets per second) volume of attack. */ volumePps?: number; } /** * An attack exposure contains the results of an attack path simulation run. */ export interface GoogleCloudSecuritycenterV2AttackExposure { /** * The resource name of the attack path simulation result that contains the * details regarding this attack exposure score. Example: * `organizations/123/simulations/456/attackExposureResults/789` */ attackExposureResult?: string; /** * The number of high value resources that are exposed as a result of this * finding. */ exposedHighValueResourcesCount?: number; /** * The number of high value resources that are exposed as a result of this * finding. */ exposedLowValueResourcesCount?: number; /** * The number of medium value resources that are exposed as a result of this * finding. */ exposedMediumValueResourcesCount?: number; /** * The most recent time the attack exposure was updated on this finding. */ latestCalculationTime?: Date; /** * A number between 0 (inclusive) and infinity that represents how important * this finding is to remediate. The higher the score, the more important it * is to remediate. */ score?: number; /** * Output only. What state this AttackExposure is in. This captures whether * or not an attack exposure has been calculated or not. */ readonly state?: | "STATE_UNSPECIFIED" | "CALCULATED" | "NOT_CALCULATED"; } function serializeGoogleCloudSecuritycenterV2AttackExposure(data: any): GoogleCloudSecuritycenterV2AttackExposure { return { ...data, latestCalculationTime: data["latestCalculationTime"] !== undefined ? data["latestCalculationTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2AttackExposure(data: any): GoogleCloudSecuritycenterV2AttackExposure { return { ...data, latestCalculationTime: data["latestCalculationTime"] !== undefined ? new Date(data["latestCalculationTime"]) : undefined, }; } /** * An AWS account that is a member of an organization. */ export interface GoogleCloudSecuritycenterV2AwsAccount { /** * The unique identifier (ID) of the account, containing exactly 12 digits. */ id?: string; /** * The friendly name of this account. */ name?: string; } /** * AWS metadata associated with the resource, only applicable if the finding's * cloud provider is Amazon Web Services. */ export interface GoogleCloudSecuritycenterV2AwsMetadata { /** * The AWS account associated with the resource. */ account?: GoogleCloudSecuritycenterV2AwsAccount; /** * The AWS organization associated with the resource. */ organization?: GoogleCloudSecuritycenterV2AwsOrganization; /** * A list of AWS organizational units associated with the resource, ordered * from lowest level (closest to the account) to highest level. */ organizationalUnits?: GoogleCloudSecuritycenterV2AwsOrganizationalUnit[]; } /** * An organization is a collection of accounts that are centrally managed * together using consolidated billing, organized hierarchically with * organizational units (OUs), and controlled with policies. */ export interface GoogleCloudSecuritycenterV2AwsOrganization { /** * The unique identifier (ID) for the organization. The regex pattern for an * organization ID string requires "o-" followed by from 10 to 32 lowercase * letters or digits. */ id?: string; } /** * An Organizational Unit (OU) is a container of AWS accounts within a root of * an organization. Policies that are attached to an OU apply to all accounts * contained in that OU and in any child OUs. */ export interface GoogleCloudSecuritycenterV2AwsOrganizationalUnit { /** * The unique identifier (ID) associated with this OU. The regex pattern for * an organizational unit ID string requires "ou-" followed by from 4 to 32 * lowercase letters or digits (the ID of the root that contains the OU). This * string is followed by a second "-" dash and from 8 to 32 additional * lowercase letters or digits. For example, "ou-ab12-cd34ef56". */ id?: string; /** * The friendly name of the OU. */ name?: string; } /** * Represents an Azure management group. */ export interface GoogleCloudSecuritycenterV2AzureManagementGroup { /** * The display name of the Azure management group. */ displayName?: string; /** * The UUID of the Azure management group, for example, * `20000000-0001-0000-0000-000000000000`. */ id?: string; } /** * Azure metadata associated with the resource, only applicable if the * finding's cloud provider is Microsoft Azure. */ export interface GoogleCloudSecuritycenterV2AzureMetadata { /** * A list of Azure management groups associated with the resource, ordered * from lowest level (closest to the subscription) to highest level. */ managementGroups?: GoogleCloudSecuritycenterV2AzureManagementGroup[]; /** * The Azure resource group associated with the resource. */ resourceGroup?: GoogleCloudSecuritycenterV2AzureResourceGroup; /** * The Azure subscription associated with the resource. */ subscription?: GoogleCloudSecuritycenterV2AzureSubscription; /** * The Azure Entra tenant associated with the resource. */ tenant?: GoogleCloudSecuritycenterV2AzureTenant; } /** * Represents an Azure resource group. */ export interface GoogleCloudSecuritycenterV2AzureResourceGroup { /** * The ID of the Azure resource group. */ id?: string; /** * The name of the Azure resource group. This is not a UUID. */ name?: string; } /** * Represents an Azure subscription. */ export interface GoogleCloudSecuritycenterV2AzureSubscription { /** * The display name of the Azure subscription. */ displayName?: string; /** * The UUID of the Azure subscription, for example, * `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. */ id?: string; } /** * Represents a Microsoft Entra tenant. */ export interface GoogleCloudSecuritycenterV2AzureTenant { /** * The display name of the Azure tenant. */ displayName?: string; /** * The ID of the Microsoft Entra tenant, for example, * "a11aaa11-aa11-1aa1-11aa-1aaa11a". */ id?: string; } /** * Information related to Google Cloud Backup and DR Service findings. */ export interface GoogleCloudSecuritycenterV2BackupDisasterRecovery { /** * The name of the Backup and DR appliance that captures, moves, and manages * the lifecycle of backup data. For example, `backup-server-57137`. */ appliance?: string; /** * The names of Backup and DR applications. An application is a VM, database, * or file system on a managed host monitored by a backup and recovery * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, * `centos7-01-vol02`. */ applications?: string[]; /** * The timestamp at which the Backup and DR backup was created. */ backupCreateTime?: Date; /** * The name of a Backup and DR template which comprises one or more backup * policies. See the [Backup and DR * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) * for more information. For example, `snap-ov`. */ backupTemplate?: string; /** * The backup type of the Backup and DR image. For example, `Snapshot`, * `Remote Snapshot`, `OnVault`. */ backupType?: string; /** * The name of a Backup and DR host, which is managed by the backup and * recovery appliance and known to the management console. The host can be of * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file * system, etc.), vCenter, or an ESX server. See the [Backup and DR * documentation on * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) * for more information. For example, `centos7-01`. */ host?: string; /** * The names of Backup and DR policies that are associated with a template * and that define when to run a backup, how frequently to run a backup, and * how long to retain the backup image. For example, `onvaults`. */ policies?: string[]; /** * The names of Backup and DR advanced policy options of a policy applying to * an application. See the [Backup and DR documentation on policy * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). * For example, `skipofflineappsincongrp, nounmap`. */ policyOptions?: string[]; /** * The name of the Backup and DR resource profile that specifies the storage * media for backups of application and VM data. See the [Backup and DR * documentation on * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). * For example, `GCP`. */ profile?: string; /** * The name of the Backup and DR storage pool that the backup and recovery * appliance is storing data in. The storage pool could be of type Cloud, * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on * storage * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). * For example, `DiskPoolOne`. */ storagePool?: string; } function serializeGoogleCloudSecuritycenterV2BackupDisasterRecovery(data: any): GoogleCloudSecuritycenterV2BackupDisasterRecovery { return { ...data, backupCreateTime: data["backupCreateTime"] !== undefined ? data["backupCreateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2BackupDisasterRecovery(data: any): GoogleCloudSecuritycenterV2BackupDisasterRecovery { return { ...data, backupCreateTime: data["backupCreateTime"] !== undefined ? new Date(data["backupCreateTime"]) : undefined, }; } /** * Configures how to deliver Findings to BigQuery Instance. */ export interface GoogleCloudSecuritycenterV2BigQueryExport { /** * Output only. The time at which the BigQuery export was created. This field * is set by the server and will be ignored if provided on export on creation. */ readonly createTime?: Date; /** * The dataset to write findings' updates to. Its format is * "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery dataset * unique ID must contain only letters (a-z, A-Z), numbers (0-9), or * underscores (_). */ dataset?: string; /** * The description of the export (max of 1024 characters). */ description?: string; /** * Expression that defines the filter to apply across create/update events of * findings. The expression is a list of zero or more restrictions combined * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` * has higher precedence than `AND`. Restrictions have the form ` ` and may * have a `-` character in front of them to indicate negation. The fields map * to those defined in the corresponding resource. The supported operators * are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * * `:`, meaning substring matching, for strings. The supported value types * are: * string literals in quotes. * integer literals without quotes. * * boolean literals `true` and `false` without quotes. */ filter?: string; /** * Output only. Email address of the user who last edited the BigQuery * export. This field is set by the server and will be ignored if provided on * export creation or update. */ readonly mostRecentEditor?: string; /** * Identifier. The relative resource name of this export. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name. * The following list shows some examples: + * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` * + * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` * This field is provided in responses, and is ignored when provided in create * requests. */ name?: string; /** * Output only. The service account that needs permission to create table and * upload data to the BigQuery dataset. */ readonly principal?: string; /** * Output only. The most recent time at which the BigQuery export was * updated. This field is set by the server and will be ignored if provided on * export creation or update. */ readonly updateTime?: Date; } /** * Represents a Kubernetes RoleBinding or ClusterRoleBinding. */ export interface GoogleCloudSecuritycenterV2Binding { /** * Name for the binding. */ name?: string; /** * Namespace for the binding. */ ns?: string; /** * The Role or ClusterRole referenced by the binding. */ role?: GoogleCloudSecuritycenterV2Role; /** * Represents one or more subjects that are bound to the role. Not always * available for PATCH requests. */ subjects?: GoogleCloudSecuritycenterV2Subject[]; } /** * The response to a BulkMute request. Contains the LRO information. */ export interface GoogleCloudSecuritycenterV2BulkMuteFindingsResponse { } /** * Fields related to Google Cloud Armor findings. */ export interface GoogleCloudSecuritycenterV2CloudArmor { /** * Information about potential Layer 7 DDoS attacks identified by [Google * Cloud Armor Adaptive * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). */ adaptiveProtection?: GoogleCloudSecuritycenterV2AdaptiveProtection; /** * Information about DDoS attack volume and classification. */ attack?: GoogleCloudSecuritycenterV2Attack; /** * Duration of attack from the start until the current moment (updated every * 5 minutes). */ duration?: number /* Duration */; /** * Information about incoming requests evaluated by [Google Cloud Armor * security * policies](https://cloud.google.com/armor/docs/security-policy-overview). */ requests?: GoogleCloudSecuritycenterV2Requests; /** * Information about the [Google Cloud Armor security * policy](https://cloud.google.com/armor/docs/security-policy-overview) * relevant to the finding. */ securityPolicy?: GoogleCloudSecuritycenterV2SecurityPolicy; /** * Distinguish between volumetric & protocol DDoS attack and application * layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS attacks, or * "L_7" for Layer 7 DDoS attacks. */ threatVector?: string; } function serializeGoogleCloudSecuritycenterV2CloudArmor(data: any): GoogleCloudSecuritycenterV2CloudArmor { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } function deserializeGoogleCloudSecuritycenterV2CloudArmor(data: any): GoogleCloudSecuritycenterV2CloudArmor { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } /** * The [data profile](https://cloud.google.com/dlp/docs/data-profiles) * associated with the finding. */ export interface GoogleCloudSecuritycenterV2CloudDlpDataProfile { /** * Name of the data profile, for example, * `projects/123/locations/europe/tableProfiles/8383929`. */ dataProfile?: string; /** * The resource hierarchy level at which the data profile was generated. */ parentType?: | "PARENT_TYPE_UNSPECIFIED" | "ORGANIZATION" | "PROJECT"; } /** * Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection * job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced * the finding. */ export interface GoogleCloudSecuritycenterV2CloudDlpInspection { /** * Whether Cloud DLP scanned the complete resource or a sampled subset. */ fullScan?: boolean; /** * The type of information (or * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. */ infoType?: string; /** * The number of times Cloud DLP found this infoType within this job and * resource. */ infoTypeCount?: bigint; /** * Name of the inspection job, for example, * `projects/123/locations/europe/dlpJobs/i-8383929`. */ inspectJob?: string; } function serializeGoogleCloudSecuritycenterV2CloudDlpInspection(data: any): GoogleCloudSecuritycenterV2CloudDlpInspection { return { ...data, infoTypeCount: data["infoTypeCount"] !== undefined ? String(data["infoTypeCount"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2CloudDlpInspection(data: any): GoogleCloudSecuritycenterV2CloudDlpInspection { return { ...data, infoTypeCount: data["infoTypeCount"] !== undefined ? BigInt(data["infoTypeCount"]) : undefined, }; } /** * Metadata taken from a [Cloud Logging * LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) */ export interface GoogleCloudSecuritycenterV2CloudLoggingEntry { /** * A unique identifier for the log entry. */ insertId?: string; /** * The type of the log (part of `log_name`. `log_name` is the resource name * of the log to which this log entry belongs). For example: * `cloudresourcemanager.googleapis.com/activity` Note that this field is not * URL-encoded, unlike in `LogEntry`. */ logId?: string; /** * The organization, folder, or project of the monitored resource that * produced this log entry. */ resourceContainer?: string; /** * The time the event described by the log entry occurred. */ timestamp?: Date; } function serializeGoogleCloudSecuritycenterV2CloudLoggingEntry(data: any): GoogleCloudSecuritycenterV2CloudLoggingEntry { return { ...data, timestamp: data["timestamp"] !== undefined ? data["timestamp"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2CloudLoggingEntry(data: any): GoogleCloudSecuritycenterV2CloudLoggingEntry { return { ...data, timestamp: data["timestamp"] !== undefined ? new Date(data["timestamp"]) : undefined, }; } /** * Contains compliance information about a security standard indicating unmet * recommendations. */ export interface GoogleCloudSecuritycenterV2Compliance { /** * Policies within the standard or benchmark, for example, A.12.4.1 */ ids?: string[]; /** * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and * OWASP. */ standard?: string; /** * Version of the standard or benchmark, for example, 1.1 */ version?: string; } /** * Contains information about the IP connection associated with the finding. */ export interface GoogleCloudSecuritycenterV2Connection { /** * Destination IP address. Not present for sockets that are listening and not * connected. */ destinationIp?: string; /** * Destination port. Not present for sockets that are listening and not * connected. */ destinationPort?: number; /** * IANA Internet Protocol Number such as TCP(6) and UDP(17). */ protocol?: | "PROTOCOL_UNSPECIFIED" | "ICMP" | "TCP" | "UDP" | "GRE" | "ESP"; /** * Source IP address. */ sourceIp?: string; /** * Source port. */ sourcePort?: number; } /** * The email address of a contact. */ export interface GoogleCloudSecuritycenterV2Contact { /** * An email address. For example, "`person123@company.com`". */ email?: string; } /** * Details about specific contacts */ export interface GoogleCloudSecuritycenterV2ContactDetails { /** * A list of contacts */ contacts?: GoogleCloudSecuritycenterV2Contact[]; } /** * Container associated with the finding. */ export interface GoogleCloudSecuritycenterV2Container { /** * The time that the container was created. */ createTime?: Date; /** * Optional container image ID, if provided by the container runtime. * Uniquely identifies the container image launched using a container image * digest. */ imageId?: string; /** * Container labels, as provided by the container runtime. */ labels?: GoogleCloudSecuritycenterV2Label[]; /** * Name of the container. */ name?: string; /** * Container image URI provided when configuring a pod or container. This * string can identify a container image version using mutable tags. */ uri?: string; } function serializeGoogleCloudSecuritycenterV2Container(data: any): GoogleCloudSecuritycenterV2Container { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Container(data: any): GoogleCloudSecuritycenterV2Container { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, }; } /** * CVE stands for Common Vulnerabilities and Exposures. Information from the * [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes * this vulnerability. */ export interface GoogleCloudSecuritycenterV2Cve { /** * Describe Common Vulnerability Scoring System specified at * https://www.first.org/cvss/v3.1/specification-document */ cvssv3?: GoogleCloudSecuritycenterV2Cvssv3; /** * The exploitation activity of the vulnerability in the wild. */ exploitationActivity?: | "EXPLOITATION_ACTIVITY_UNSPECIFIED" | "WIDE" | "CONFIRMED" | "AVAILABLE" | "ANTICIPATED" | "NO_KNOWN"; /** * Date the first publicly available exploit or PoC was released. */ exploitReleaseDate?: Date; /** * Date of the earliest known exploitation. */ firstExploitationDate?: Date; /** * The unique identifier for the vulnerability. e.g. CVE-2021-34527 */ id?: string; /** * The potential impact of the vulnerability if it was to be exploited. */ impact?: | "RISK_RATING_UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"; /** * Whether or not the vulnerability has been observed in the wild. */ observedInTheWild?: boolean; /** * Additional information about the CVE. e.g. * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 */ references?: GoogleCloudSecuritycenterV2Reference[]; /** * Whether upstream fix is available for the CVE. */ upstreamFixAvailable?: boolean; /** * Whether or not the vulnerability was zero day when the finding was * published. */ zeroDay?: boolean; } function serializeGoogleCloudSecuritycenterV2Cve(data: any): GoogleCloudSecuritycenterV2Cve { return { ...data, exploitReleaseDate: data["exploitReleaseDate"] !== undefined ? data["exploitReleaseDate"].toISOString() : undefined, firstExploitationDate: data["firstExploitationDate"] !== undefined ? data["firstExploitationDate"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Cve(data: any): GoogleCloudSecuritycenterV2Cve { return { ...data, exploitReleaseDate: data["exploitReleaseDate"] !== undefined ? new Date(data["exploitReleaseDate"]) : undefined, firstExploitationDate: data["firstExploitationDate"] !== undefined ? new Date(data["firstExploitationDate"]) : undefined, }; } /** * Common Vulnerability Scoring System version 3. */ export interface GoogleCloudSecuritycenterV2Cvssv3 { /** * This metric describes the conditions beyond the attacker's control that * must exist in order to exploit the vulnerability. */ attackComplexity?: | "ATTACK_COMPLEXITY_UNSPECIFIED" | "ATTACK_COMPLEXITY_LOW" | "ATTACK_COMPLEXITY_HIGH"; /** * Base Metrics Represents the intrinsic characteristics of a vulnerability * that are constant over time and across user environments. This metric * reflects the context by which vulnerability exploitation is possible. */ attackVector?: | "ATTACK_VECTOR_UNSPECIFIED" | "ATTACK_VECTOR_NETWORK" | "ATTACK_VECTOR_ADJACENT" | "ATTACK_VECTOR_LOCAL" | "ATTACK_VECTOR_PHYSICAL"; /** * This metric measures the impact to the availability of the impacted * component resulting from a successfully exploited vulnerability. */ availabilityImpact?: | "IMPACT_UNSPECIFIED" | "IMPACT_HIGH" | "IMPACT_LOW" | "IMPACT_NONE"; /** * The base score is a function of the base metric scores. */ baseScore?: number; /** * This metric measures the impact to the confidentiality of the information * resources managed by a software component due to a successfully exploited * vulnerability. */ confidentialityImpact?: | "IMPACT_UNSPECIFIED" | "IMPACT_HIGH" | "IMPACT_LOW" | "IMPACT_NONE"; /** * This metric measures the impact to integrity of a successfully exploited * vulnerability. */ integrityImpact?: | "IMPACT_UNSPECIFIED" | "IMPACT_HIGH" | "IMPACT_LOW" | "IMPACT_NONE"; /** * This metric describes the level of privileges an attacker must possess * before successfully exploiting the vulnerability. */ privilegesRequired?: | "PRIVILEGES_REQUIRED_UNSPECIFIED" | "PRIVILEGES_REQUIRED_NONE" | "PRIVILEGES_REQUIRED_LOW" | "PRIVILEGES_REQUIRED_HIGH"; /** * The Scope metric captures whether a vulnerability in one vulnerable * component impacts resources in components beyond its security scope. */ scope?: | "SCOPE_UNSPECIFIED" | "SCOPE_UNCHANGED" | "SCOPE_CHANGED"; /** * This metric captures the requirement for a human user, other than the * attacker, to participate in the successful compromise of the vulnerable * component. */ userInteraction?: | "USER_INTERACTION_UNSPECIFIED" | "USER_INTERACTION_NONE" | "USER_INTERACTION_REQUIRED"; } /** * Details about a data access attempt made by a principal not authorized under * applicable data security policy. */ export interface GoogleCloudSecuritycenterV2DataAccessEvent { /** * Unique identifier for data access event. */ eventId?: string; /** * Timestamp of data access event. */ eventTime?: Date; /** * The operation performed by the principal to access the data. */ operation?: | "OPERATION_UNSPECIFIED" | "READ" | "MOVE" | "COPY"; /** * The email address of the principal that accessed the data. The principal * could be a user account, service account, Google group, or other. */ principalEmail?: string; } function serializeGoogleCloudSecuritycenterV2DataAccessEvent(data: any): GoogleCloudSecuritycenterV2DataAccessEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2DataAccessEvent(data: any): GoogleCloudSecuritycenterV2DataAccessEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, }; } /** * Represents database access information, such as queries. A database may be a * sub-resource of an instance (as in the case of Cloud SQL instances or Cloud * Spanner instances), or the database instance itself. Some database resources * might not have the [full resource * name](https://google.aip.dev/122#full-resource-names) populated because these * resource types, such as Cloud SQL databases, are not yet supported by Cloud * Asset Inventory. In these cases only the display name is provided. */ export interface GoogleCloudSecuritycenterV2Database { /** * The human-readable name of the database that the user connected to. */ displayName?: string; /** * The target usernames, roles, or groups of an SQL privilege grant, which is * not an IAM policy change. */ grantees?: string[]; /** * Some database resources may not have the [full resource * name](https://google.aip.dev/122#full-resource-names) populated because * these resource types are not yet supported by Cloud Asset Inventory (e.g. * Cloud SQL databases). In these cases only the display name will be * provided. The [full resource * name](https://google.aip.dev/122#full-resource-names) of the database that * the user connected to, if it is supported by Cloud Asset Inventory. */ name?: string; /** * The SQL statement that is associated with the database access. */ query?: string; /** * The username used to connect to the database. The username might not be an * IAM principal and does not have a set format. */ userName?: string; /** * The version of the database, for example, POSTGRES_14. See [the complete * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). */ version?: string; } /** * Details about a data flow event, in which either the data is moved to or is * accessed from a non-compliant geo-location, as defined in the applicable data * security policy. */ export interface GoogleCloudSecuritycenterV2DataFlowEvent { /** * Unique identifier for data flow event. */ eventId?: string; /** * Timestamp of data flow event. */ eventTime?: Date; /** * The operation performed by the principal for the data flow event. */ operation?: | "OPERATION_UNSPECIFIED" | "READ" | "MOVE" | "COPY"; /** * The email address of the principal that initiated the data flow event. The * principal could be a user account, service account, Google group, or other. */ principalEmail?: string; /** * Non-compliant location of the principal or the data destination. */ violatedLocation?: string; } function serializeGoogleCloudSecuritycenterV2DataFlowEvent(data: any): GoogleCloudSecuritycenterV2DataFlowEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2DataFlowEvent(data: any): GoogleCloudSecuritycenterV2DataFlowEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, }; } /** * Memory hash detection contributing to the binary family match. */ export interface GoogleCloudSecuritycenterV2Detection { /** * The name of the binary associated with the memory hash signature * detection. */ binary?: string; /** * The percentage of memory page hashes in the signature that were matched. */ percentPagesMatched?: number; } /** * Contains information about the disk associated with the finding. */ export interface GoogleCloudSecuritycenterV2Disk { /** * The name of the disk, for example, * "https://www.googleapis.com/compute/v1/projects/project-id/zones/zone-id/disks/disk-id". */ name?: string; } /** * Path of the file in terms of underlying disk/partition identifiers. */ export interface GoogleCloudSecuritycenterV2DiskPath { /** * UUID of the partition (format * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) */ partitionUuid?: string; /** * Relative path of the file in the partition as a JSON encoded string. * Example: /home/user1/executable_file.sh */ relativePath?: string; } /** * The record of a dynamic mute rule that matches the finding. */ export interface GoogleCloudSecuritycenterV2DynamicMuteRecord { /** * When the dynamic mute rule first matched the finding. */ matchTime?: Date; /** * The relative resource name of the mute rule, represented by a mute config, * that created this record, for example * `organizations/123/muteConfigs/mymuteconfig` or * `organizations/123/locations/global/muteConfigs/mymuteconfig`. */ muteConfig?: string; } function serializeGoogleCloudSecuritycenterV2DynamicMuteRecord(data: any): GoogleCloudSecuritycenterV2DynamicMuteRecord { return { ...data, matchTime: data["matchTime"] !== undefined ? data["matchTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2DynamicMuteRecord(data: any): GoogleCloudSecuritycenterV2DynamicMuteRecord { return { ...data, matchTime: data["matchTime"] !== undefined ? new Date(data["matchTime"]) : undefined, }; } /** * A name-value pair representing an environment variable used in an operating * system process. */ export interface GoogleCloudSecuritycenterV2EnvironmentVariable { /** * Environment variable name as a JSON encoded string. */ name?: string; /** * Environment variable value as a JSON encoded string. */ val?: string; } /** * Resource where data was exfiltrated from or exfiltrated to. */ export interface GoogleCloudSecuritycenterV2ExfilResource { /** * Subcomponents of the asset that was exfiltrated, like URIs used during * exfiltration, table names, databases, and filenames. For example, multiple * tables might have been exfiltrated from the same Cloud SQL instance, or * multiple files might have been exfiltrated from the same Cloud Storage * bucket. */ components?: string[]; /** * The resource's [full resource * name](https://cloud.google.com/apis/design/resource_names#full_resource_name). */ name?: string; } /** * Exfiltration represents a data exfiltration attempt from one or more sources * to one or more targets. The `sources` attribute lists the sources of the * exfiltrated data. The `targets` attribute lists the destinations the data was * copied to. */ export interface GoogleCloudSecuritycenterV2Exfiltration { /** * If there are multiple sources, then the data is considered "joined" * between them. For instance, BigQuery can join multiple tables, and each * table would be considered a source. */ sources?: GoogleCloudSecuritycenterV2ExfilResource[]; /** * If there are multiple targets, each target would get a complete copy of * the "joined" source data. */ targets?: GoogleCloudSecuritycenterV2ExfilResource[]; /** * Total exfiltrated bytes processed for the entire job. */ totalExfiltratedBytes?: bigint; } function serializeGoogleCloudSecuritycenterV2Exfiltration(data: any): GoogleCloudSecuritycenterV2Exfiltration { return { ...data, totalExfiltratedBytes: data["totalExfiltratedBytes"] !== undefined ? String(data["totalExfiltratedBytes"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Exfiltration(data: any): GoogleCloudSecuritycenterV2Exfiltration { return { ...data, totalExfiltratedBytes: data["totalExfiltratedBytes"] !== undefined ? BigInt(data["totalExfiltratedBytes"]) : undefined, }; } /** * Representation of third party SIEM/SOAR fields within SCC. */ export interface GoogleCloudSecuritycenterV2ExternalSystem { /** * References primary/secondary etc assignees in the external system. */ assignees?: string[]; /** * The time when the case was closed, as reported by the external system. */ caseCloseTime?: Date; /** * The time when the case was created, as reported by the external system. */ caseCreateTime?: Date; /** * The priority of the finding's corresponding case in the external system. */ casePriority?: string; /** * The SLA of the finding's corresponding case in the external system. */ caseSla?: Date; /** * The link to the finding's corresponding case in the external system. */ caseUri?: string; /** * The time when the case was last updated, as reported by the external * system. */ externalSystemUpdateTime?: Date; /** * The identifier that's used to track the finding's corresponding case in * the external system. */ externalUid?: string; /** * Full resource name of the external system. The following list shows some * examples: + * `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` * + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` * + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + * `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` */ name?: string; /** * The most recent status of the finding's corresponding case, as reported by * the external system. */ status?: string; /** * Information about the ticket, if any, that is being used to track the * resolution of the issue that is identified by this finding. */ ticketInfo?: GoogleCloudSecuritycenterV2TicketInfo; } function serializeGoogleCloudSecuritycenterV2ExternalSystem(data: any): GoogleCloudSecuritycenterV2ExternalSystem { return { ...data, caseCloseTime: data["caseCloseTime"] !== undefined ? data["caseCloseTime"].toISOString() : undefined, caseCreateTime: data["caseCreateTime"] !== undefined ? data["caseCreateTime"].toISOString() : undefined, caseSla: data["caseSla"] !== undefined ? data["caseSla"].toISOString() : undefined, externalSystemUpdateTime: data["externalSystemUpdateTime"] !== undefined ? data["externalSystemUpdateTime"].toISOString() : undefined, ticketInfo: data["ticketInfo"] !== undefined ? serializeGoogleCloudSecuritycenterV2TicketInfo(data["ticketInfo"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2ExternalSystem(data: any): GoogleCloudSecuritycenterV2ExternalSystem { return { ...data, caseCloseTime: data["caseCloseTime"] !== undefined ? new Date(data["caseCloseTime"]) : undefined, caseCreateTime: data["caseCreateTime"] !== undefined ? new Date(data["caseCreateTime"]) : undefined, caseSla: data["caseSla"] !== undefined ? new Date(data["caseSla"]) : undefined, externalSystemUpdateTime: data["externalSystemUpdateTime"] !== undefined ? new Date(data["externalSystemUpdateTime"]) : undefined, ticketInfo: data["ticketInfo"] !== undefined ? deserializeGoogleCloudSecuritycenterV2TicketInfo(data["ticketInfo"]) : undefined, }; } /** * File information about the related binary/library used by an executable, or * the script used by a script interpreter */ export interface GoogleCloudSecuritycenterV2File { /** * Prefix of the file contents as a JSON-encoded string. */ contents?: string; /** * Path of the file in terms of underlying disk/partition identifiers. */ diskPath?: GoogleCloudSecuritycenterV2DiskPath; /** * The length in bytes of the file prefix that was hashed. If hashed_size == * size, any hashes reported represent the entire file. */ hashedSize?: bigint; /** * True when the hash covers only a prefix of the file. */ partiallyHashed?: boolean; /** * Absolute path of the file as a JSON encoded string. */ path?: string; /** * SHA256 hash of the first hashed_size bytes of the file encoded as a hex * string. If hashed_size == size, sha256 represents the SHA256 hash of the * entire file. */ sha256?: string; /** * Size of the file in bytes. */ size?: bigint; } function serializeGoogleCloudSecuritycenterV2File(data: any): GoogleCloudSecuritycenterV2File { return { ...data, hashedSize: data["hashedSize"] !== undefined ? String(data["hashedSize"]) : undefined, size: data["size"] !== undefined ? String(data["size"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2File(data: any): GoogleCloudSecuritycenterV2File { return { ...data, hashedSize: data["hashedSize"] !== undefined ? BigInt(data["hashedSize"]) : undefined, size: data["size"] !== undefined ? BigInt(data["size"]) : undefined, }; } /** * 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 GoogleCloudSecuritycenterV2Finding { /** * Access details associated with the finding, such as more information on * the caller, which method was accessed, and from where. */ access?: GoogleCloudSecuritycenterV2Access; /** * Represents an application associated with the finding. */ application?: GoogleCloudSecuritycenterV2Application; /** * The results of an attack path simulation relevant to this finding. */ attackExposure?: GoogleCloudSecuritycenterV2AttackExposure; /** * Fields related to Backup and DR findings. */ backupDisasterRecovery?: GoogleCloudSecuritycenterV2BackupDisasterRecovery; /** * Output only. The canonical name of the finding. The following list shows * some examples: + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` * + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` * The prefix is the closest CRM ancestor of the resource associated with the * finding. */ readonly canonicalName?: string; /** * Immutable. The additional taxonomy group within findings from a given * source. Example: "XSS_FLASH_INJECTION" */ category?: string; /** * Fields related to Cloud Armor findings. */ cloudArmor?: GoogleCloudSecuritycenterV2CloudArmor; /** * Cloud DLP data profile that is associated with the finding. */ cloudDlpDataProfile?: GoogleCloudSecuritycenterV2CloudDlpDataProfile; /** * Cloud Data Loss Prevention (Cloud DLP) inspection results that are * associated with the finding. */ cloudDlpInspection?: GoogleCloudSecuritycenterV2CloudDlpInspection; /** * Contains compliance information for security standards associated to the * finding. */ compliances?: GoogleCloudSecuritycenterV2Compliance[]; /** * Contains information about the IP connection associated with the finding. */ connections?: GoogleCloudSecuritycenterV2Connection[]; /** * Output only. Map containing the points of contact for the given finding. * The key represents the type of contact, while the value contains a list of * all the contacts that pertain. Please refer to: * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories * { "security": { "contacts": [ { "email": "person1@company.com" }, { * "email": "person2@company.com" } ] } } */ readonly contacts?: { [key: string]: GoogleCloudSecuritycenterV2ContactDetails }; /** * Containers associated with the finding. This field provides information * for both Kubernetes and non-Kubernetes containers. */ containers?: GoogleCloudSecuritycenterV2Container[]; /** * Output only. The time at which the finding was created in Security Command * Center. */ readonly createTime?: Date; /** * Data access events associated with the finding. */ dataAccessEvents?: GoogleCloudSecuritycenterV2DataAccessEvent[]; /** * Database associated with the finding. */ database?: GoogleCloudSecuritycenterV2Database; /** * Data flow events associated with the finding. */ dataFlowEvents?: GoogleCloudSecuritycenterV2DataFlowEvent[]; /** * Contains more details about the finding. */ description?: string; /** * Disk associated with the finding. */ disk?: GoogleCloudSecuritycenterV2Disk; /** * The time the finding was first detected. If an existing finding is * updated, then this is the time the update occurred. For example, if the * finding represents an open firewall, this property captures the time the * detector believes the firewall became open. The accuracy is determined by * the detector. If the finding is later resolved, then this time reflects * when the finding was resolved. This must not be set to a value greater than * the current timestamp. */ eventTime?: Date; /** * Represents exfiltrations associated with the finding. */ exfiltration?: GoogleCloudSecuritycenterV2Exfiltration; /** * Output only. Third party SIEM/SOAR fields within SCC, contains external * system information and external system finding fields. */ readonly externalSystems?: { [key: string]: GoogleCloudSecuritycenterV2ExternalSystem }; /** * 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; /** * File associated with the finding. */ files?: GoogleCloudSecuritycenterV2File[]; /** * The class of the finding. */ findingClass?: | "FINDING_CLASS_UNSPECIFIED" | "THREAT" | "VULNERABILITY" | "MISCONFIGURATION" | "OBSERVATION" | "SCC_ERROR" | "POSTURE_VIOLATION" | "TOXIC_COMBINATION" | "SENSITIVE_DATA_RISK"; /** * Contains details about groups of which this finding is a member. A group * is a collection of findings that are related in some way. This field cannot * be updated. Its value is ignored in all update requests. */ groupMemberships?: GoogleCloudSecuritycenterV2GroupMembership[]; /** * Represents IAM bindings associated with the finding. */ iamBindings?: GoogleCloudSecuritycenterV2IamBinding[]; /** * Represents what's commonly known as an *indicator of compromise* (IoC) in * computer forensics. This is an artifact observed on a network or in an * operating system that, with high confidence, indicates a computer * intrusion. For more information, see [Indicator of * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). */ indicator?: GoogleCloudSecuritycenterV2Indicator; /** * Signature of the kernel rootkit. */ kernelRootkit?: GoogleCloudSecuritycenterV2KernelRootkit; /** * Kubernetes resources associated with the finding. */ kubernetes?: GoogleCloudSecuritycenterV2Kubernetes; /** * The load balancers associated with the finding. */ loadBalancers?: GoogleCloudSecuritycenterV2LoadBalancer[]; /** * Log entries that are relevant to the finding. */ logEntries?: GoogleCloudSecuritycenterV2LogEntry[]; /** * MITRE ATT&CK tactics and techniques related to this finding. See: * https://attack.mitre.org */ mitreAttack?: GoogleCloudSecuritycenterV2MitreAttack; /** * Unique identifier of the module which generated the finding. Example: * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 */ moduleName?: string; /** * Indicates the mute state of a finding (either muted, unmuted or * undefined). Unlike other attributes of a finding, a finding provider * shouldn't set the value of mute. */ mute?: | "MUTE_UNSPECIFIED" | "MUTED" | "UNMUTED" | "UNDEFINED"; /** * Output only. The mute information regarding this finding. */ readonly muteInfo?: GoogleCloudSecuritycenterV2MuteInfo; /** * Records additional information about the mute operation, for example, the * [mute * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) * that muted the finding and the user who muted the finding. */ muteInitiator?: string; /** * Output only. The most recent time this finding was muted or unmuted. */ readonly muteUpdateTime?: Date; /** * The [relative resource * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) * of the finding. The following list shows some examples: + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` * + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` */ name?: string; /** * Steps to address the finding. */ nextSteps?: string; /** * Notebook associated with the finding. */ notebook?: GoogleCloudSecuritycenterV2Notebook; /** * Contains information about the org policies associated with the finding. */ orgPolicies?: GoogleCloudSecuritycenterV2OrgPolicy[]; /** * The relative resource name of the source and location the finding belongs * to. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * This field is immutable after creation time. The following list shows some * examples: + `organizations/{organization_id}/sources/{source_id}` + * `folders/{folders_id}/sources/{source_id}` + * `projects/{projects_id}/sources/{source_id}` + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + * `projects/{projects_id}/sources/{source_id}/locations/{location_id}` */ parent?: string; /** * Output only. The human readable display name of the finding source such as * "Event Threat Detection" or "Security Health Analytics". */ readonly parentDisplayName?: string; /** * Represents operating system processes associated with the Finding. */ processes?: GoogleCloudSecuritycenterV2Process[]; /** * Immutable. 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. */ resourceName?: string; /** * 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. */ readonly securityMarks?: GoogleCloudSecuritycenterV2SecurityMarks; /** * The security posture associated with the finding. */ securityPosture?: GoogleCloudSecuritycenterV2SecurityPosture; /** * The severity of the finding. This field is managed by the source that * writes the finding. */ severity?: | "SEVERITY_UNSPECIFIED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; /** * 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 }; /** * Output only. The state of the finding. */ readonly state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "INACTIVE"; /** * Contains details about a group of security issues that, when the issues * occur together, represent a greater risk than when the issues occur * independently. A group of such issues is referred to as a toxic * combination. This field cannot be updated. Its value is ignored in all * update requests. */ toxicCombination?: GoogleCloudSecuritycenterV2ToxicCombination; /** * Represents vulnerability-specific fields like CVE and CVSS scores. CVE * stands for Common Vulnerabilities and Exposures * (https://cve.mitre.org/about/) */ vulnerability?: GoogleCloudSecuritycenterV2Vulnerability; } function serializeGoogleCloudSecuritycenterV2Finding(data: any): GoogleCloudSecuritycenterV2Finding { return { ...data, attackExposure: data["attackExposure"] !== undefined ? serializeGoogleCloudSecuritycenterV2AttackExposure(data["attackExposure"]) : undefined, backupDisasterRecovery: data["backupDisasterRecovery"] !== undefined ? serializeGoogleCloudSecuritycenterV2BackupDisasterRecovery(data["backupDisasterRecovery"]) : undefined, cloudArmor: data["cloudArmor"] !== undefined ? serializeGoogleCloudSecuritycenterV2CloudArmor(data["cloudArmor"]) : undefined, cloudDlpInspection: data["cloudDlpInspection"] !== undefined ? serializeGoogleCloudSecuritycenterV2CloudDlpInspection(data["cloudDlpInspection"]) : undefined, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (serializeGoogleCloudSecuritycenterV2Container(item))) : undefined, dataAccessEvents: data["dataAccessEvents"] !== undefined ? data["dataAccessEvents"].map((item: any) => (serializeGoogleCloudSecuritycenterV2DataAccessEvent(item))) : undefined, dataFlowEvents: data["dataFlowEvents"] !== undefined ? data["dataFlowEvents"].map((item: any) => (serializeGoogleCloudSecuritycenterV2DataFlowEvent(item))) : undefined, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, exfiltration: data["exfiltration"] !== undefined ? serializeGoogleCloudSecuritycenterV2Exfiltration(data["exfiltration"]) : undefined, files: data["files"] !== undefined ? data["files"].map((item: any) => (serializeGoogleCloudSecuritycenterV2File(item))) : undefined, kubernetes: data["kubernetes"] !== undefined ? serializeGoogleCloudSecuritycenterV2Kubernetes(data["kubernetes"]) : undefined, logEntries: data["logEntries"] !== undefined ? data["logEntries"].map((item: any) => (serializeGoogleCloudSecuritycenterV2LogEntry(item))) : undefined, notebook: data["notebook"] !== undefined ? serializeGoogleCloudSecuritycenterV2Notebook(data["notebook"]) : undefined, processes: data["processes"] !== undefined ? data["processes"].map((item: any) => (serializeGoogleCloudSecuritycenterV2Process(item))) : undefined, vulnerability: data["vulnerability"] !== undefined ? serializeGoogleCloudSecuritycenterV2Vulnerability(data["vulnerability"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Finding(data: any): GoogleCloudSecuritycenterV2Finding { return { ...data, attackExposure: data["attackExposure"] !== undefined ? deserializeGoogleCloudSecuritycenterV2AttackExposure(data["attackExposure"]) : undefined, backupDisasterRecovery: data["backupDisasterRecovery"] !== undefined ? deserializeGoogleCloudSecuritycenterV2BackupDisasterRecovery(data["backupDisasterRecovery"]) : undefined, cloudArmor: data["cloudArmor"] !== undefined ? deserializeGoogleCloudSecuritycenterV2CloudArmor(data["cloudArmor"]) : undefined, cloudDlpInspection: data["cloudDlpInspection"] !== undefined ? deserializeGoogleCloudSecuritycenterV2CloudDlpInspection(data["cloudDlpInspection"]) : undefined, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2Container(item))) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, dataAccessEvents: data["dataAccessEvents"] !== undefined ? data["dataAccessEvents"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2DataAccessEvent(item))) : undefined, dataFlowEvents: data["dataFlowEvents"] !== undefined ? data["dataFlowEvents"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2DataFlowEvent(item))) : undefined, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, exfiltration: data["exfiltration"] !== undefined ? deserializeGoogleCloudSecuritycenterV2Exfiltration(data["exfiltration"]) : undefined, externalSystems: data["externalSystems"] !== undefined ? Object.fromEntries(Object.entries(data["externalSystems"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudSecuritycenterV2ExternalSystem(v)]))) : undefined, files: data["files"] !== undefined ? data["files"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2File(item))) : undefined, kubernetes: data["kubernetes"] !== undefined ? deserializeGoogleCloudSecuritycenterV2Kubernetes(data["kubernetes"]) : undefined, logEntries: data["logEntries"] !== undefined ? data["logEntries"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2LogEntry(item))) : undefined, muteInfo: data["muteInfo"] !== undefined ? deserializeGoogleCloudSecuritycenterV2MuteInfo(data["muteInfo"]) : undefined, muteUpdateTime: data["muteUpdateTime"] !== undefined ? new Date(data["muteUpdateTime"]) : undefined, notebook: data["notebook"] !== undefined ? deserializeGoogleCloudSecuritycenterV2Notebook(data["notebook"]) : undefined, processes: data["processes"] !== undefined ? data["processes"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2Process(item))) : undefined, vulnerability: data["vulnerability"] !== undefined ? deserializeGoogleCloudSecuritycenterV2Vulnerability(data["vulnerability"]) : undefined, }; } /** * Message that contains the resource name and display name of a folder * resource. */ export interface GoogleCloudSecuritycenterV2Folder { /** * Full resource name of this folder. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ resourceFolder?: string; /** * The user defined display name for this folder. */ resourceFolderDisplayName?: string; } /** * Represents a geographical location for a given access. */ export interface GoogleCloudSecuritycenterV2Geolocation { /** * A CLDR. */ regionCode?: string; } /** * Contains details about groups of which this finding is a member. A group is * a collection of findings that are related in some way. */ export interface GoogleCloudSecuritycenterV2GroupMembership { /** * ID of the group. */ groupId?: string; /** * Type of group. */ groupType?: | "GROUP_TYPE_UNSPECIFIED" | "GROUP_TYPE_TOXIC_COMBINATION"; } /** * Represents a particular IAM binding, which captures a member's role * addition, removal, or state. */ export interface GoogleCloudSecuritycenterV2IamBinding { /** * The action that was performed on a Binding. */ action?: | "ACTION_UNSPECIFIED" | "ADD" | "REMOVE"; /** * A single identity requesting access for a Cloud Platform resource, for * example, "foo@google.com". */ member?: string; /** * Role that is assigned to "members". For example, "roles/viewer", * "roles/editor", or "roles/owner". */ role?: string; } /** * Represents what's commonly known as an _indicator of compromise_ (IoC) in * computer forensics. This is an artifact observed on a network or in an * operating system that, with high confidence, indicates a computer intrusion. * For more information, see [Indicator of * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). */ export interface GoogleCloudSecuritycenterV2Indicator { /** * List of domains associated to the Finding. */ domains?: string[]; /** * The list of IP addresses that are associated with the finding. */ ipAddresses?: string[]; /** * The list of matched signatures indicating that the given process is * present in the environment. */ signatures?: GoogleCloudSecuritycenterV2ProcessSignature[]; /** * The list of URIs associated to the Findings. */ uris?: string[]; } /** * Kernel mode rootkit signatures. */ export interface GoogleCloudSecuritycenterV2KernelRootkit { /** * Rootkit name, when available. */ name?: string; /** * True if unexpected modifications of kernel code memory are present. */ unexpectedCodeModification?: boolean; /** * True if `ftrace` points are present with callbacks pointing to regions * that are not in the expected kernel or module code range. */ unexpectedFtraceHandler?: boolean; /** * True if interrupt handlers that are are not in the expected kernel or * module code regions are present. */ unexpectedInterruptHandler?: boolean; /** * True if kernel code pages that are not in the expected kernel or module * code regions are present. */ unexpectedKernelCodePages?: boolean; /** * True if `kprobe` points are present with callbacks pointing to regions * that are not in the expected kernel or module code range. */ unexpectedKprobeHandler?: boolean; /** * True if unexpected processes in the scheduler run queue are present. Such * processes are in the run queue, but not in the process task list. */ unexpectedProcessesInRunqueue?: boolean; /** * True if unexpected modifications of kernel read-only data memory are * present. */ unexpectedReadOnlyDataModification?: boolean; /** * True if system call handlers that are are not in the expected kernel or * module code regions are present. */ unexpectedSystemCallHandler?: boolean; } /** * Kubernetes-related attributes. */ export interface GoogleCloudSecuritycenterV2Kubernetes { /** * Provides information on any Kubernetes access reviews (privilege checks) * relevant to the finding. */ accessReviews?: GoogleCloudSecuritycenterV2AccessReview[]; /** * Provides Kubernetes role binding information for findings that involve * [RoleBindings or * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). */ bindings?: GoogleCloudSecuritycenterV2Binding[]; /** * GKE [node * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) * associated with the finding. This field contains node pool information for * each node, when it is available. */ nodePools?: GoogleCloudSecuritycenterV2NodePool[]; /** * Provides Kubernetes * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) * information. */ nodes?: GoogleCloudSecuritycenterV2Node[]; /** * Kubernetes objects related to the finding. */ objects?: GoogleCloudSecuritycenterV2Object[]; /** * Kubernetes * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) * associated with the finding. This field contains Pod records for each * container that is owned by a Pod. */ pods?: GoogleCloudSecuritycenterV2Pod[]; /** * Provides Kubernetes role information for findings that involve [Roles or * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). */ roles?: GoogleCloudSecuritycenterV2Role[]; } function serializeGoogleCloudSecuritycenterV2Kubernetes(data: any): GoogleCloudSecuritycenterV2Kubernetes { return { ...data, objects: data["objects"] !== undefined ? data["objects"].map((item: any) => (serializeGoogleCloudSecuritycenterV2Object(item))) : undefined, pods: data["pods"] !== undefined ? data["pods"].map((item: any) => (serializeGoogleCloudSecuritycenterV2Pod(item))) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Kubernetes(data: any): GoogleCloudSecuritycenterV2Kubernetes { return { ...data, objects: data["objects"] !== undefined ? data["objects"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2Object(item))) : undefined, pods: data["pods"] !== undefined ? data["pods"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2Pod(item))) : undefined, }; } /** * Represents a generic name-value label. A label has separate name and value * fields to support filtering with the `contains()` function. For more * information, see [Filtering on array-type * fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). */ export interface GoogleCloudSecuritycenterV2Label { /** * Name of the label. */ name?: string; /** * Value that corresponds to the label's name. */ value?: string; } /** * Contains information related to the load balancer associated with the * finding. */ export interface GoogleCloudSecuritycenterV2LoadBalancer { /** * The name of the load balancer associated with the finding. */ name?: string; } /** * An individual entry in a log. */ export interface GoogleCloudSecuritycenterV2LogEntry { /** * An individual entry in a log stored in Cloud Logging. */ cloudLoggingEntry?: GoogleCloudSecuritycenterV2CloudLoggingEntry; } function serializeGoogleCloudSecuritycenterV2LogEntry(data: any): GoogleCloudSecuritycenterV2LogEntry { return { ...data, cloudLoggingEntry: data["cloudLoggingEntry"] !== undefined ? serializeGoogleCloudSecuritycenterV2CloudLoggingEntry(data["cloudLoggingEntry"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2LogEntry(data: any): GoogleCloudSecuritycenterV2LogEntry { return { ...data, cloudLoggingEntry: data["cloudLoggingEntry"] !== undefined ? deserializeGoogleCloudSecuritycenterV2CloudLoggingEntry(data["cloudLoggingEntry"]) : undefined, }; } /** * A signature corresponding to memory page hashes. */ export interface GoogleCloudSecuritycenterV2MemoryHashSignature { /** * The binary family. */ binaryFamily?: string; /** * The list of memory hash detections contributing to the binary family * match. */ detections?: GoogleCloudSecuritycenterV2Detection[]; } /** * MITRE ATT&CK tactics and techniques related to this finding. See: * https://attack.mitre.org */ export interface GoogleCloudSecuritycenterV2MitreAttack { /** * Additional MITRE ATT&CK tactics related to this finding, if any. */ additionalTactics?: | "TACTIC_UNSPECIFIED" | "RECONNAISSANCE" | "RESOURCE_DEVELOPMENT" | "INITIAL_ACCESS" | "EXECUTION" | "PERSISTENCE" | "PRIVILEGE_ESCALATION" | "DEFENSE_EVASION" | "CREDENTIAL_ACCESS" | "DISCOVERY" | "LATERAL_MOVEMENT" | "COLLECTION" | "COMMAND_AND_CONTROL" | "EXFILTRATION" | "IMPACT"[]; /** * Additional MITRE ATT&CK techniques related to this finding, if any, along * with any of their respective parent techniques. */ additionalTechniques?: | "TECHNIQUE_UNSPECIFIED" | "MASQUERADING" | "MATCH_LEGITIMATE_NAME_OR_LOCATION" | "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" | "STARTUP_ITEMS" | "NETWORK_SERVICE_DISCOVERY" | "PROCESS_DISCOVERY" | "COMMAND_AND_SCRIPTING_INTERPRETER" | "UNIX_SHELL" | "PYTHON" | "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" | "PERMISSION_GROUPS_DISCOVERY" | "CLOUD_GROUPS" | "INDICATOR_REMOVAL_FILE_DELETION" | "APPLICATION_LAYER_PROTOCOL" | "DNS" | "SOFTWARE_DEPLOYMENT_TOOLS" | "VALID_ACCOUNTS" | "DEFAULT_ACCOUNTS" | "LOCAL_ACCOUNTS" | "CLOUD_ACCOUNTS" | "PROXY" | "EXTERNAL_PROXY" | "MULTI_HOP_PROXY" | "ACCOUNT_MANIPULATION" | "ADDITIONAL_CLOUD_CREDENTIALS" | "SSH_AUTHORIZED_KEYS" | "ADDITIONAL_CONTAINER_CLUSTER_ROLES" | "INGRESS_TOOL_TRANSFER" | "NATIVE_API" | "BRUTE_FORCE" | "SHARED_MODULES" | "ACCESS_TOKEN_MANIPULATION" | "TOKEN_IMPERSONATION_OR_THEFT" | "EXPLOIT_PUBLIC_FACING_APPLICATION" | "DOMAIN_POLICY_MODIFICATION" | "DATA_DESTRUCTION" | "SERVICE_STOP" | "INHIBIT_SYSTEM_RECOVERY" | "RESOURCE_HIJACKING" | "NETWORK_DENIAL_OF_SERVICE" | "CLOUD_SERVICE_DISCOVERY" | "STEAL_APPLICATION_ACCESS_TOKEN" | "ACCOUNT_ACCESS_REMOVAL" | "STEAL_WEB_SESSION_COOKIE" | "CREATE_OR_MODIFY_SYSTEM_PROCESS" | "EVENT_TRIGGERED_EXECUTION" | "ABUSE_ELEVATION_CONTROL_MECHANISM" | "UNSECURED_CREDENTIALS" | "MODIFY_AUTHENTICATION_PROCESS" | "IMPAIR_DEFENSES" | "DISABLE_OR_MODIFY_TOOLS" | "EXFILTRATION_OVER_WEB_SERVICE" | "EXFILTRATION_TO_CLOUD_STORAGE" | "DYNAMIC_RESOLUTION" | "LATERAL_TOOL_TRANSFER" | "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" | "CREATE_SNAPSHOT" | "CLOUD_INFRASTRUCTURE_DISCOVERY" | "OBTAIN_CAPABILITIES" | "ACTIVE_SCANNING" | "SCANNING_IP_BLOCKS" | "CONTAINER_ADMINISTRATION_COMMAND" | "DEPLOY_CONTAINER" | "ESCAPE_TO_HOST" | "CONTAINER_AND_RESOURCE_DISCOVERY" | "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES"[]; /** * The MITRE ATT&CK tactic most closely represented by this finding, if any. */ primaryTactic?: | "TACTIC_UNSPECIFIED" | "RECONNAISSANCE" | "RESOURCE_DEVELOPMENT" | "INITIAL_ACCESS" | "EXECUTION" | "PERSISTENCE" | "PRIVILEGE_ESCALATION" | "DEFENSE_EVASION" | "CREDENTIAL_ACCESS" | "DISCOVERY" | "LATERAL_MOVEMENT" | "COLLECTION" | "COMMAND_AND_CONTROL" | "EXFILTRATION" | "IMPACT"; /** * The MITRE ATT&CK technique most closely represented by this finding, if * any. primary_techniques is a repeated field because there are multiple * levels of MITRE ATT&CK techniques. If the technique most closely * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), * both the sub-technique and its parent technique(s) will be listed (e.g. * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). */ primaryTechniques?: | "TECHNIQUE_UNSPECIFIED" | "MASQUERADING" | "MATCH_LEGITIMATE_NAME_OR_LOCATION" | "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" | "STARTUP_ITEMS" | "NETWORK_SERVICE_DISCOVERY" | "PROCESS_DISCOVERY" | "COMMAND_AND_SCRIPTING_INTERPRETER" | "UNIX_SHELL" | "PYTHON" | "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" | "PERMISSION_GROUPS_DISCOVERY" | "CLOUD_GROUPS" | "INDICATOR_REMOVAL_FILE_DELETION" | "APPLICATION_LAYER_PROTOCOL" | "DNS" | "SOFTWARE_DEPLOYMENT_TOOLS" | "VALID_ACCOUNTS" | "DEFAULT_ACCOUNTS" | "LOCAL_ACCOUNTS" | "CLOUD_ACCOUNTS" | "PROXY" | "EXTERNAL_PROXY" | "MULTI_HOP_PROXY" | "ACCOUNT_MANIPULATION" | "ADDITIONAL_CLOUD_CREDENTIALS" | "SSH_AUTHORIZED_KEYS" | "ADDITIONAL_CONTAINER_CLUSTER_ROLES" | "INGRESS_TOOL_TRANSFER" | "NATIVE_API" | "BRUTE_FORCE" | "SHARED_MODULES" | "ACCESS_TOKEN_MANIPULATION" | "TOKEN_IMPERSONATION_OR_THEFT" | "EXPLOIT_PUBLIC_FACING_APPLICATION" | "DOMAIN_POLICY_MODIFICATION" | "DATA_DESTRUCTION" | "SERVICE_STOP" | "INHIBIT_SYSTEM_RECOVERY" | "RESOURCE_HIJACKING" | "NETWORK_DENIAL_OF_SERVICE" | "CLOUD_SERVICE_DISCOVERY" | "STEAL_APPLICATION_ACCESS_TOKEN" | "ACCOUNT_ACCESS_REMOVAL" | "STEAL_WEB_SESSION_COOKIE" | "CREATE_OR_MODIFY_SYSTEM_PROCESS" | "EVENT_TRIGGERED_EXECUTION" | "ABUSE_ELEVATION_CONTROL_MECHANISM" | "UNSECURED_CREDENTIALS" | "MODIFY_AUTHENTICATION_PROCESS" | "IMPAIR_DEFENSES" | "DISABLE_OR_MODIFY_TOOLS" | "EXFILTRATION_OVER_WEB_SERVICE" | "EXFILTRATION_TO_CLOUD_STORAGE" | "DYNAMIC_RESOLUTION" | "LATERAL_TOOL_TRANSFER" | "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" | "CREATE_SNAPSHOT" | "CLOUD_INFRASTRUCTURE_DISCOVERY" | "OBTAIN_CAPABILITIES" | "ACTIVE_SCANNING" | "SCANNING_IP_BLOCKS" | "CONTAINER_ADMINISTRATION_COMMAND" | "DEPLOY_CONTAINER" | "ESCAPE_TO_HOST" | "CONTAINER_AND_RESOURCE_DISCOVERY" | "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES"[]; /** * The MITRE ATT&CK version referenced by the above fields. E.g. "8". */ version?: string; } /** * A mute config is a Cloud SCC resource that contains the configuration to * mute create/update events of findings. */ export interface GoogleCloudSecuritycenterV2MuteConfig { /** * Output only. The time at which the mute config was created. This field is * set by the server and will be ignored if provided on config creation. */ readonly createTime?: Date; /** * A description of the mute config. */ description?: string; /** * Optional. The expiry of the mute config. Only applicable for dynamic * configs. If the expiry is set, when the config expires, it is removed from * all findings. */ expiryTime?: Date; /** * Required. An expression that defines the filter to apply across * create/update events of findings. While creating a filter string, be * mindful of the scope in which the mute configuration is being created. * E.g., If a filter contains project = X but is created under the project = Y * scope, it might not match any findings. The following field and operator * combinations are supported: * severity: `=`, `:` * category: `=`, `:` * * resource.name: `=`, `:` * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: * `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: * `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:` */ filter?: string; /** * Output only. Email address of the user who last edited the mute config. * This field is set by the server and will be ignored if provided on config * creation or update. */ readonly mostRecentEditor?: string; /** * Identifier. This field will be ignored if provided on config creation. The * following list shows some examples of the format: + * `organizations/{organization}/muteConfigs/{mute_config}` + * `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` * + `folders/{folder}/muteConfigs/{mute_config}` + * `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + * `projects/{project}/muteConfigs/{mute_config}` + * `projects/{project}/locations/{location}/muteConfigs/{mute_config}` */ name?: string; /** * Required. The type of the mute config, which determines what type of mute * state the config affects. Immutable after creation. */ type?: | "MUTE_CONFIG_TYPE_UNSPECIFIED" | "STATIC" | "DYNAMIC"; /** * Output only. The most recent time at which the mute config was updated. * This field is set by the server and will be ignored if provided on config * creation or update. */ readonly updateTime?: Date; } function serializeGoogleCloudSecuritycenterV2MuteConfig(data: any): GoogleCloudSecuritycenterV2MuteConfig { return { ...data, expiryTime: data["expiryTime"] !== undefined ? data["expiryTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2MuteConfig(data: any): GoogleCloudSecuritycenterV2MuteConfig { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, expiryTime: data["expiryTime"] !== undefined ? new Date(data["expiryTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Mute information about the finding, including whether the finding has a * static mute or any matching dynamic mute rules. */ export interface GoogleCloudSecuritycenterV2MuteInfo { /** * The list of dynamic mute rules that currently match the finding. */ dynamicMuteRecords?: GoogleCloudSecuritycenterV2DynamicMuteRecord[]; /** * If set, the static mute applied to this finding. Static mutes override * dynamic mutes. If unset, there is no static mute. */ staticMute?: GoogleCloudSecuritycenterV2StaticMute; } function serializeGoogleCloudSecuritycenterV2MuteInfo(data: any): GoogleCloudSecuritycenterV2MuteInfo { return { ...data, dynamicMuteRecords: data["dynamicMuteRecords"] !== undefined ? data["dynamicMuteRecords"].map((item: any) => (serializeGoogleCloudSecuritycenterV2DynamicMuteRecord(item))) : undefined, staticMute: data["staticMute"] !== undefined ? serializeGoogleCloudSecuritycenterV2StaticMute(data["staticMute"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2MuteInfo(data: any): GoogleCloudSecuritycenterV2MuteInfo { return { ...data, dynamicMuteRecords: data["dynamicMuteRecords"] !== undefined ? data["dynamicMuteRecords"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2DynamicMuteRecord(item))) : undefined, staticMute: data["staticMute"] !== undefined ? deserializeGoogleCloudSecuritycenterV2StaticMute(data["staticMute"]) : undefined, }; } /** * Kubernetes nodes associated with the finding. */ export interface GoogleCloudSecuritycenterV2Node { /** * [Full resource name](https://google.aip.dev/122#full-resource-names) of * the Compute Engine VM running the cluster node. */ name?: string; } /** * Provides GKE node pool information. */ export interface GoogleCloudSecuritycenterV2NodePool { /** * Kubernetes node pool name. */ name?: string; /** * Nodes associated with the finding. */ nodes?: GoogleCloudSecuritycenterV2Node[]; } /** * Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise * notebook](https://cloud.google.com/colab/docs/introduction) file, that is * associated with a finding. */ export interface GoogleCloudSecuritycenterV2Notebook { /** * The user ID of the latest author to modify the notebook. */ lastAuthor?: string; /** * The name of the notebook. */ name?: string; /** * The most recent time the notebook was updated. */ notebookUpdateTime?: Date; /** * The source notebook service, for example, "Colab Enterprise". */ service?: string; } function serializeGoogleCloudSecuritycenterV2Notebook(data: any): GoogleCloudSecuritycenterV2Notebook { return { ...data, notebookUpdateTime: data["notebookUpdateTime"] !== undefined ? data["notebookUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Notebook(data: any): GoogleCloudSecuritycenterV2Notebook { return { ...data, notebookUpdateTime: data["notebookUpdateTime"] !== undefined ? new Date(data["notebookUpdateTime"]) : undefined, }; } /** * Cloud SCC's Notification */ export interface GoogleCloudSecuritycenterV2NotificationMessage { /** * If it's a Finding based notification config, this field will be populated. */ finding?: GoogleCloudSecuritycenterV2Finding; /** * Name of the notification config that generated current notification. */ notificationConfigName?: string; /** * The Cloud resource tied to this notification's Finding. */ resource?: GoogleCloudSecuritycenterV2Resource; } function serializeGoogleCloudSecuritycenterV2NotificationMessage(data: any): GoogleCloudSecuritycenterV2NotificationMessage { return { ...data, finding: data["finding"] !== undefined ? serializeGoogleCloudSecuritycenterV2Finding(data["finding"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2NotificationMessage(data: any): GoogleCloudSecuritycenterV2NotificationMessage { return { ...data, finding: data["finding"] !== undefined ? deserializeGoogleCloudSecuritycenterV2Finding(data["finding"]) : undefined, }; } /** * Kubernetes object related to the finding, uniquely identified by GKNN. Used * if the object Kind is not one of Pod, Node, NodePool, Binding, or * AccessReview. */ export interface GoogleCloudSecuritycenterV2Object { /** * Pod containers associated with this finding, if any. */ containers?: GoogleCloudSecuritycenterV2Container[]; /** * Kubernetes object group, such as "policy.k8s.io/v1". */ group?: string; /** * Kubernetes object kind, such as "Namespace". */ kind?: string; /** * Kubernetes object name. For details see * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. */ name?: string; /** * Kubernetes object namespace. Must be a valid DNS label. Named "ns" to * avoid collision with C++ namespace keyword. For details see * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. */ ns?: string; } function serializeGoogleCloudSecuritycenterV2Object(data: any): GoogleCloudSecuritycenterV2Object { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (serializeGoogleCloudSecuritycenterV2Container(item))) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Object(data: any): GoogleCloudSecuritycenterV2Object { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2Container(item))) : undefined, }; } /** * Contains information about the org policies associated with the finding. */ export interface GoogleCloudSecuritycenterV2OrgPolicy { /** * The resource name of the org policy. Example: * "organizations/{organization_id}/policies/{constraint_name}" */ name?: string; } /** * Package is a generic definition of a package. */ export interface GoogleCloudSecuritycenterV2Package { /** * The CPE URI where the vulnerability was detected. */ cpeUri?: string; /** * The name of the package where the vulnerability was detected. */ packageName?: string; /** * Type of package, for example, os, maven, or go. */ packageType?: string; /** * The version of the package. */ packageVersion?: string; } /** * A Kubernetes Pod. */ export interface GoogleCloudSecuritycenterV2Pod { /** * Pod containers associated with this finding, if any. */ containers?: GoogleCloudSecuritycenterV2Container[]; /** * Pod labels. For Kubernetes containers, these are applied to the container. */ labels?: GoogleCloudSecuritycenterV2Label[]; /** * Kubernetes Pod name. */ name?: string; /** * Kubernetes Pod namespace. */ ns?: string; } function serializeGoogleCloudSecuritycenterV2Pod(data: any): GoogleCloudSecuritycenterV2Pod { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (serializeGoogleCloudSecuritycenterV2Container(item))) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Pod(data: any): GoogleCloudSecuritycenterV2Pod { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2Container(item))) : undefined, }; } /** * The policy field that violates the deployed posture and its expected and * detected values. */ export interface GoogleCloudSecuritycenterV2PolicyDriftDetails { /** * The detected value that violates the deployed posture, for example, * `false` or `allowed_values={"projects/22831892"}`. */ detectedValue?: string; /** * The value of this field that was configured in a posture, for example, * `true` or `allowed_values={"projects/29831892"}`. */ expectedValue?: string; /** * The name of the updated field, for example * constraint.implementation.policy_rules[0].enforce */ field?: string; } /** * Represents an operating system process. */ export interface GoogleCloudSecuritycenterV2Process { /** * Process arguments as JSON encoded strings. */ args?: string[]; /** * True if `args` is incomplete. */ argumentsTruncated?: boolean; /** * File information for the process executable. */ binary?: GoogleCloudSecuritycenterV2File; /** * Process environment variables. */ envVariables?: GoogleCloudSecuritycenterV2EnvironmentVariable[]; /** * True if `env_variables` is incomplete. */ envVariablesTruncated?: boolean; /** * File information for libraries loaded by the process. */ libraries?: GoogleCloudSecuritycenterV2File[]; /** * The process name, as displayed in utilities like `top` and `ps`. This name * can be accessed through `/proc/[pid]/comm` and changed with * `prctl(PR_SET_NAME)`. */ name?: string; /** * The parent process ID. */ parentPid?: bigint; /** * The process ID. */ pid?: bigint; /** * When the process represents the invocation of a script, `binary` provides * information about the interpreter, while `script` provides information * about the script file provided to the interpreter. */ script?: GoogleCloudSecuritycenterV2File; } function serializeGoogleCloudSecuritycenterV2Process(data: any): GoogleCloudSecuritycenterV2Process { return { ...data, binary: data["binary"] !== undefined ? serializeGoogleCloudSecuritycenterV2File(data["binary"]) : undefined, libraries: data["libraries"] !== undefined ? data["libraries"].map((item: any) => (serializeGoogleCloudSecuritycenterV2File(item))) : undefined, parentPid: data["parentPid"] !== undefined ? String(data["parentPid"]) : undefined, pid: data["pid"] !== undefined ? String(data["pid"]) : undefined, script: data["script"] !== undefined ? serializeGoogleCloudSecuritycenterV2File(data["script"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Process(data: any): GoogleCloudSecuritycenterV2Process { return { ...data, binary: data["binary"] !== undefined ? deserializeGoogleCloudSecuritycenterV2File(data["binary"]) : undefined, libraries: data["libraries"] !== undefined ? data["libraries"].map((item: any) => (deserializeGoogleCloudSecuritycenterV2File(item))) : undefined, parentPid: data["parentPid"] !== undefined ? BigInt(data["parentPid"]) : undefined, pid: data["pid"] !== undefined ? BigInt(data["pid"]) : undefined, script: data["script"] !== undefined ? deserializeGoogleCloudSecuritycenterV2File(data["script"]) : undefined, }; } /** * Indicates what signature matched this process. */ export interface GoogleCloudSecuritycenterV2ProcessSignature { /** * Signature indicating that a binary family was matched. */ memoryHashSignature?: GoogleCloudSecuritycenterV2MemoryHashSignature; /** * Describes the type of resource associated with the signature. */ signatureType?: | "SIGNATURE_TYPE_UNSPECIFIED" | "SIGNATURE_TYPE_PROCESS" | "SIGNATURE_TYPE_FILE"; /** * Signature indicating that a YARA rule was matched. */ yaraRuleSignature?: GoogleCloudSecuritycenterV2YaraRuleSignature; } /** * Additional Links */ export interface GoogleCloudSecuritycenterV2Reference { /** * Source of the reference e.g. NVD */ source?: string; /** * Uri for the mentioned source e.g. * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. */ uri?: string; } /** * Information about the requests relevant to the finding. */ export interface GoogleCloudSecuritycenterV2Requests { /** * Allowed RPS (requests per second) over the long term. */ longTermAllowed?: number; /** * Denied RPS (requests per second) over the long term. */ longTermDenied?: number; /** * For 'Increasing deny ratio', the ratio is the denied traffic divided by * the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed * traffic in the short term divided by allowed traffic in the long term. */ ratio?: number; /** * Allowed RPS (requests per second) in the short term. */ shortTermAllowed?: number; } /** * Information related to the Google Cloud resource. */ export interface GoogleCloudSecuritycenterV2Resource { /** * The AWS metadata associated with the finding. */ awsMetadata?: GoogleCloudSecuritycenterV2AwsMetadata; /** * The Azure metadata associated with the finding. */ azureMetadata?: GoogleCloudSecuritycenterV2AzureMetadata; /** * Indicates which cloud provider the finding is from. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * The human readable name of the resource. */ displayName?: string; /** * The GCP metadata associated with the finding. */ gcpMetadata?: GcpMetadata; /** * The region or location of the service (if applicable). */ location?: string; /** * The full resource name of the resource. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ name?: string; /** * Provides the path to the resource within the resource hierarchy. */ resourcePath?: GoogleCloudSecuritycenterV2ResourcePath; /** * A string representation of the resource path. For Google Cloud, it has the * format of * `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` * where there can be any number of folders. For AWS, it has the format of * `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` * where there can be any number of organizational units. For Azure, it has * the format of * `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` * where there can be any number of management groups. */ resourcePathString?: string; /** * The service or resource provider associated with the resource. */ service?: string; /** * The full resource type of the resource. */ type?: string; } /** * Represents the path of resources leading up to the resource this finding is * about. */ export interface GoogleCloudSecuritycenterV2ResourcePath { /** * The list of nodes that make the up resource path, ordered from lowest * level to highest level. */ nodes?: GoogleCloudSecuritycenterV2ResourcePathNode[]; } /** * A node within the resource path. Each node represents a resource within the * resource hierarchy. */ export interface GoogleCloudSecuritycenterV2ResourcePathNode { /** * The display name of the resource this node represents. */ displayName?: string; /** * The ID of the resource this node represents. */ id?: string; /** * The type of resource this node represents. */ nodeType?: | "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" | "GCP_ORGANIZATION" | "GCP_FOLDER" | "GCP_PROJECT" | "AWS_ORGANIZATION" | "AWS_ORGANIZATIONAL_UNIT" | "AWS_ACCOUNT" | "AZURE_MANAGEMENT_GROUP" | "AZURE_SUBSCRIPTION" | "AZURE_RESOURCE_GROUP"; } /** * A resource value configuration (RVC) is a mapping configuration of user's * resources to resource values. Used in Attack path simulations. */ export interface GoogleCloudSecuritycenterV2ResourceValueConfig { /** * Cloud provider this configuration applies to */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * Output only. Timestamp this resource value configuration was created. */ readonly createTime?: Date; /** * Description of the resource value configuration. */ description?: string; /** * Identifier. Name for the resource value configuration */ name?: string; /** * List of resource labels to search for, evaluated with `AND`. For example, * "resource_labels_selector": {"key": "value", "env": "prod"} will match * resources with labels "key": "value" `AND` "env": "prod" * https://cloud.google.com/resource-manager/docs/creating-managing-labels */ resourceLabelsSelector?: { [key: string]: string }; /** * Apply resource_value only to resources that match resource_type. * resource_type will be checked with `AND` of other resources. For example, * "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply * "HIGH" value only to "storage.googleapis.com/Bucket" resources. */ resourceType?: string; /** * Resource value level this expression represents Only required when there * is no Sensitive Data Protection mapping in the request */ resourceValue?: | "RESOURCE_VALUE_UNSPECIFIED" | "HIGH" | "MEDIUM" | "LOW" | "NONE"; /** * Project or folder to scope this configuration to. For example, * "project/456" would apply this configuration only to resources in * "project/456" scope and will be checked with `AND` of other resources. */ scope?: string; /** * A mapping of the sensitivity on Sensitive Data Protection finding to * resource values. This mapping can only be used in combination with a * resource_type that is related to BigQuery, e.g. * "bigquery.googleapis.com/Dataset". */ sensitiveDataProtectionMapping?: GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping; /** * Tag values combined with `AND` to check against. For Google Cloud * resources, they are tag value IDs in the form of "tagValues/123". Example: * `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` * https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing */ tagValues?: string[]; /** * Output only. Timestamp this resource value configuration was last updated. */ readonly updateTime?: Date; } /** * Kubernetes Role or ClusterRole. */ export interface GoogleCloudSecuritycenterV2Role { /** * Role type. */ kind?: | "KIND_UNSPECIFIED" | "ROLE" | "CLUSTER_ROLE"; /** * Role name. */ name?: string; /** * Role namespace. */ ns?: string; } /** * SecurityBulletin are notifications of vulnerabilities of Google products. */ export interface GoogleCloudSecuritycenterV2SecurityBulletin { /** * ID of the bulletin corresponding to the vulnerability. */ bulletinId?: string; /** * Submission time of this Security Bulletin. */ submissionTime?: Date; /** * This represents a version that the cluster receiving this notification * should be upgraded to, based on its current version. For example, 1.15.0 */ suggestedUpgradeVersion?: string; } function serializeGoogleCloudSecuritycenterV2SecurityBulletin(data: any): GoogleCloudSecuritycenterV2SecurityBulletin { return { ...data, submissionTime: data["submissionTime"] !== undefined ? data["submissionTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2SecurityBulletin(data: any): GoogleCloudSecuritycenterV2SecurityBulletin { return { ...data, submissionTime: data["submissionTime"] !== undefined ? new Date(data["submissionTime"]) : undefined, }; } /** * 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 GoogleCloudSecuritycenterV2SecurityMarks { /** * The canonical name of the marks. The following list shows some examples: + * `organizations/{organization_id}/assets/{asset_id}/securityMarks` + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` * + `folders/{folder_id}/assets/{asset_id}/securityMarks` + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` * + `projects/{project_number}/assets/{asset_id}/securityMarks` + * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` * + * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` */ canonicalName?: string; /** * 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 }; /** * The relative resource name of the SecurityMarks. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * The following list shows some examples: + * `organizations/{organization_id}/assets/{asset_id}/securityMarks` + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` */ name?: string; } /** * Information about the [Google Cloud Armor security * policy](https://cloud.google.com/armor/docs/security-policy-overview) * relevant to the finding. */ export interface GoogleCloudSecuritycenterV2SecurityPolicy { /** * The name of the Google Cloud Armor security policy, for example, * "my-security-policy". */ name?: string; /** * Whether or not the associated rule or policy is in preview mode. */ preview?: boolean; /** * The type of Google Cloud Armor security policy for example, 'backend * security policy', 'edge security policy', 'network edge security policy', * or 'always-on DDoS protection'. */ type?: string; } /** * Represents a posture that is deployed on Google Cloud by the Security * Command Center Posture Management service. A posture contains one or more * policy sets. A policy set is a group of policies that enforce a set of * security rules on Google Cloud. */ export interface GoogleCloudSecuritycenterV2SecurityPosture { /** * The name of the updated policy, for example, * `projects/{project_id}/policies/{constraint_name}`. */ changedPolicy?: string; /** * Name of the posture, for example, `CIS-Posture`. */ name?: string; /** * The ID of the updated policy, for example, `compute-policy-1`. */ policy?: string; /** * The details about a change in an updated policy that violates the deployed * posture. */ policyDriftDetails?: GoogleCloudSecuritycenterV2PolicyDriftDetails[]; /** * The name of the updated policy set, for example, `cis-policyset`. */ policySet?: string; /** * The name of the posture deployment, for example, * `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. */ postureDeployment?: string; /** * The project, folder, or organization on which the posture is deployed, for * example, `projects/{project_number}`. */ postureDeploymentResource?: string; /** * The version of the posture, for example, `c7cfa2a8`. */ revisionId?: string; } /** * Resource value mapping for Sensitive Data Protection findings If any of * these mappings have a resource value that is not unspecified, the * resource_value field will be ignored when reading this configuration. */ export interface GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping { /** * Resource value mapping for high-sensitivity Sensitive Data Protection * findings */ highSensitivityMapping?: | "RESOURCE_VALUE_UNSPECIFIED" | "HIGH" | "MEDIUM" | "LOW" | "NONE"; /** * Resource value mapping for medium-sensitivity Sensitive Data Protection * findings */ mediumSensitivityMapping?: | "RESOURCE_VALUE_UNSPECIFIED" | "HIGH" | "MEDIUM" | "LOW" | "NONE"; } /** * Identity delegation history of an authenticated service account. */ export interface GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo { /** * The email address of a Google account. */ principalEmail?: string; /** * A string representing the principal_subject associated with the identity. * As compared to `principal_email`, supports principals that aren't * associated with email addresses, such as third party principals. For most * identities, the format will be `principal://iam.googleapis.com/{identity * pool name}/subjects/{subject}` except for some GKE identities * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy * format `serviceAccount:{identity pool name}[{subject}]` */ principalSubject?: string; } /** * Information about the static mute state. A static mute state overrides any * dynamic mute rules that apply to this finding. The static mute state can be * set by a static mute rule or by muting the finding directly. */ export interface GoogleCloudSecuritycenterV2StaticMute { /** * When the static mute was applied. */ applyTime?: Date; /** * The static mute state. If the value is `MUTED` or `UNMUTED`, then the * finding's overall mute state will have the same value. */ state?: | "MUTE_UNSPECIFIED" | "MUTED" | "UNMUTED" | "UNDEFINED"; } function serializeGoogleCloudSecuritycenterV2StaticMute(data: any): GoogleCloudSecuritycenterV2StaticMute { return { ...data, applyTime: data["applyTime"] !== undefined ? data["applyTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2StaticMute(data: any): GoogleCloudSecuritycenterV2StaticMute { return { ...data, applyTime: data["applyTime"] !== undefined ? new Date(data["applyTime"]) : undefined, }; } /** * Represents a Kubernetes subject. */ export interface GoogleCloudSecuritycenterV2Subject { /** * Authentication type for the subject. */ kind?: | "AUTH_TYPE_UNSPECIFIED" | "USER" | "SERVICEACCOUNT" | "GROUP"; /** * Name for the subject. */ name?: string; /** * Namespace for the subject. */ ns?: string; } /** * Information about the ticket, if any, that is being used to track the * resolution of the issue that is identified by this finding. */ export interface GoogleCloudSecuritycenterV2TicketInfo { /** * The assignee of the ticket in the ticket system. */ assignee?: string; /** * The description of the ticket in the ticket system. */ description?: string; /** * The identifier of the ticket in the ticket system. */ id?: string; /** * The latest status of the ticket, as reported by the ticket system. */ status?: string; /** * The time when the ticket was last updated, as reported by the ticket * system. */ updateTime?: Date; /** * The link to the ticket in the ticket system. */ uri?: string; } function serializeGoogleCloudSecuritycenterV2TicketInfo(data: any): GoogleCloudSecuritycenterV2TicketInfo { return { ...data, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudSecuritycenterV2TicketInfo(data: any): GoogleCloudSecuritycenterV2TicketInfo { return { ...data, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Contains details about a group of security issues that, when the issues * occur together, represent a greater risk than when the issues occur * independently. A group of such issues is referred to as a toxic combination. */ export interface GoogleCloudSecuritycenterV2ToxicCombination { /** * The [Attack exposure * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) * of this toxic combination. The score is a measure of how much this toxic * combination exposes one or more high-value resources to potential attack. */ attackExposureScore?: number; /** * List of resource names of findings associated with this toxic combination. * For example, `organizations/123/sources/456/findings/789`. */ relatedFindings?: string[]; } /** * Refers to common vulnerability fields e.g. cve, cvss, cwe etc. */ export interface GoogleCloudSecuritycenterV2Vulnerability { /** * CVE stands for Common Vulnerabilities and Exposures * (https://cve.mitre.org/about/) */ cve?: GoogleCloudSecuritycenterV2Cve; /** * The fixed package is relevant to the finding. */ fixedPackage?: GoogleCloudSecuritycenterV2Package; /** * The offending package is relevant to the finding. */ offendingPackage?: GoogleCloudSecuritycenterV2Package; /** * The security bulletin is relevant to this finding. */ securityBulletin?: GoogleCloudSecuritycenterV2SecurityBulletin; } function serializeGoogleCloudSecuritycenterV2Vulnerability(data: any): GoogleCloudSecuritycenterV2Vulnerability { return { ...data, cve: data["cve"] !== undefined ? serializeGoogleCloudSecuritycenterV2Cve(data["cve"]) : undefined, securityBulletin: data["securityBulletin"] !== undefined ? serializeGoogleCloudSecuritycenterV2SecurityBulletin(data["securityBulletin"]) : undefined, }; } function deserializeGoogleCloudSecuritycenterV2Vulnerability(data: any): GoogleCloudSecuritycenterV2Vulnerability { return { ...data, cve: data["cve"] !== undefined ? deserializeGoogleCloudSecuritycenterV2Cve(data["cve"]) : undefined, securityBulletin: data["securityBulletin"] !== undefined ? deserializeGoogleCloudSecuritycenterV2SecurityBulletin(data["securityBulletin"]) : undefined, }; } /** * A signature corresponding to a YARA rule. */ export interface GoogleCloudSecuritycenterV2YaraRuleSignature { /** * The name of the YARA rule. */ yaraRule?: string; } /** * Request message for grouping by assets. */ export interface GroupAssetsRequest { /** * When compare_duration is set, the GroupResult's "state_change" property is * updated to indicate whether the asset was added, removed, or remained * present during the compare_duration period of time that precedes the * read_time. This is the time between (read_time - compare_duration) and * read_time. The state change value is derived based on the presence of the * asset at the two points in time. Intermediate state changes between the two * times don't affect the result. For example, the results aren't affected if * the asset is removed and re-created again. Possible "state_change" values * when compare_duration is specified: * "ADDED": indicates that the asset was * not present at the start of compare_duration, but present at * reference_time. * "REMOVED": indicates that the asset was present at the * start of compare_duration, but not present at reference_time. * "ACTIVE": * indicates that the asset was present at both the start and the end of the * time period defined by compare_duration and reference_time. If * compare_duration is not specified, then the only possible state_change is * "UNUSED", which will be the state_change set for all assets present at * read_time. If this field is set then `state_change` must be a specified * field in `group_by`. */ compareDuration?: number /* Duration */; /** * Expression that defines the filter to apply across assets. The expression * is a list of zero or more restrictions combined via logical operators `AND` * and `OR`. Parentheses are supported, and `OR` has higher precedence than * `AND`. Restrictions have the form ` ` and may have a `-` character in front * of them to indicate negation. The fields map to those defined in the Asset * resource. Examples include: * name * * security_center_properties.resource_name * resource_properties.a_property * * security_marks.marks.marka The supported operators are: * `=` for all value * types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring * matching, for strings. The supported value types are: * string literals in * quotes. * integer literals without quotes. * boolean literals `true` and * `false` without quotes. The following field and operator combinations are * supported: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This * should be milliseconds since epoch or an RFC3339 string. Examples: * `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds * since epoch or an RFC3339 string. Examples: `create_time = * "2019-06-10T16:07:18-07:00"` `create_time = 1560208038000` * * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` For example, * `resource_properties.size = 100` is a valid filter string. Use a partial * match on the empty string to filter based on a property existing: * `resource_properties.my_property : ""` Use a negated partial match on the * empty string to filter based on a property not existing: * `-resource_properties.my_property : ""` */ filter?: string; /** * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. * For example: * "security_center_properties.resource_project,security_center_properties.project". * The following fields are supported when compare_duration is not set: * * security_center_properties.resource_project * * security_center_properties.resource_project_display_name * * security_center_properties.resource_type * * security_center_properties.resource_parent * * security_center_properties.resource_parent_display_name The following * fields are supported when compare_duration is set: * * security_center_properties.resource_type * * security_center_properties.resource_project_display_name * * security_center_properties.resource_parent_display_name */ groupBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `GroupAssetsResponse`; indicates that this * is a continuation of a prior `GroupAssets` call, and that the system should * return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering assets. The filter is * limited to assets existing at the supplied time and their values are those * at that specific time. Absence of this field will default to the API's * version of NOW. */ readTime?: Date; } function serializeGroupAssetsRequest(data: any): GroupAssetsRequest { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeGroupAssetsRequest(data: any): GroupAssetsRequest { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Response message for grouping by assets. */ export interface GroupAssetsResponse { /** * Group results. There exists an element for each existing unique * combination of property/values. The element contains a count for the number * of times those specific property/values appear. */ groupByResults?: GroupResult[]; /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * Time used for executing the groupBy request. */ readTime?: Date; /** * The total number of results matching the query. */ totalSize?: number; } function serializeGroupAssetsResponse(data: any): GroupAssetsResponse { return { ...data, groupByResults: data["groupByResults"] !== undefined ? data["groupByResults"].map((item: any) => (serializeGroupResult(item))) : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeGroupAssetsResponse(data: any): GroupAssetsResponse { return { ...data, groupByResults: data["groupByResults"] !== undefined ? data["groupByResults"].map((item: any) => (deserializeGroupResult(item))) : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Request message for grouping by findings. */ export interface GroupFindingsRequest { /** * When compare_duration is set, the GroupResult's "state_change" attribute * is updated to indicate whether the finding had its state changed, the * finding's state remained unchanged, or if the finding was added during the * compare_duration period of time that precedes the read_time. This is the * time between (read_time - compare_duration) and read_time. The state_change * value is derived based on the presence and state of the finding at the two * points in time. Intermediate state changes between the two times don't * affect the result. For example, the results aren't affected if the finding * is made inactive and then active again. Possible "state_change" values when * compare_duration is specified: * "CHANGED": indicates that the finding was * present and matched the given filter at the start of compare_duration, but * changed its state at read_time. * "UNCHANGED": indicates that the finding * was present and matched the given filter at the start of compare_duration * and did not change state at read_time. * "ADDED": indicates that the * finding did not match the given filter or was not present at the start of * compare_duration, but was present at read_time. * "REMOVED": indicates that * the finding was present and matched the filter at the start of * compare_duration, but did not match the filter at read_time. If * compare_duration is not specified, then the only possible state_change is * "UNUSED", which will be the state_change set for all findings present at * read_time. If this field is set then `state_change` must be a specified * field in `group_by`. */ compareDuration?: number /* Duration */; /** * Expression that defines the filter to apply across findings. The * expression is a list of one or more restrictions combined via logical * operators `AND` and `OR`. Parentheses are supported, and `OR` has higher * precedence than `AND`. Restrictions have the form ` ` and may have a `-` * character in front of them to indicate negation. Examples include: * name * * source_properties.a_property * security_marks.marks.marka The supported * operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for * integer values. * `:`, meaning substring matching, for strings. The * supported value types are: * string literals in quotes. * integer literals * without quotes. * boolean literals `true` and `false` without quotes. The * following field and operator combinations are supported: * name: `=` * * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: * `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time = * 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` For example, `source_properties.size = 100` is a valid filter * string. Use a partial match on the empty string to filter based on a * property existing: `source_properties.my_property : ""` Use a negated * partial match on the empty string to filter based on a property not * existing: `-source_properties.my_property : ""` * resource: * * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` */ filter?: string; /** * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: * comma separated list of fields. For example: "parent,resource_name". The * following fields are supported when compare_duration is set: * state_change */ groupBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `GroupFindingsResponse`; indicates that * this is a continuation of a prior `GroupFindings` call, and that the system * should return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. */ readTime?: Date; } function serializeGroupFindingsRequest(data: any): GroupFindingsRequest { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeGroupFindingsRequest(data: any): GroupFindingsRequest { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Response message for group by findings. */ export interface GroupFindingsResponse { /** * Group results. There exists an element for each existing unique * combination of property/values. The element contains a count for the number * of times those specific property/values appear. */ groupByResults?: GroupResult[]; /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * Time used for executing the groupBy request. */ readTime?: Date; /** * The total number of results matching the query. */ totalSize?: number; } function serializeGroupFindingsResponse(data: any): GroupFindingsResponse { return { ...data, groupByResults: data["groupByResults"] !== undefined ? data["groupByResults"].map((item: any) => (serializeGroupResult(item))) : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeGroupFindingsResponse(data: any): GroupFindingsResponse { return { ...data, groupByResults: data["groupByResults"] !== undefined ? data["groupByResults"].map((item: any) => (deserializeGroupResult(item))) : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Contains details about groups of which this finding is a member. A group is * a collection of findings that are related in some way. */ export interface GroupMembership { /** * ID of the group. */ groupId?: string; /** * Type of group. */ groupType?: | "GROUP_TYPE_UNSPECIFIED" | "GROUP_TYPE_TOXIC_COMBINATION"; } /** * Result containing the properties and count of a groupBy request. */ export interface GroupResult { /** * Total count of resources for the given properties. */ count?: bigint; /** * Properties matching the groupBy fields in the request. */ properties?: { [key: string]: any }; } function serializeGroupResult(data: any): GroupResult { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, }; } function deserializeGroupResult(data: any): GroupResult { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, }; } /** * Represents a particular IAM binding, which captures a member's role * addition, removal, or state. */ export interface IamBinding { /** * The action that was performed on a Binding. */ action?: | "ACTION_UNSPECIFIED" | "ADD" | "REMOVE"; /** * A single identity requesting access for a Cloud Platform resource, for * example, "foo@google.com". */ member?: string; /** * Role that is assigned to "members". For example, "roles/viewer", * "roles/editor", or "roles/owner". */ role?: string; } /** * Cloud IAM Policy information associated with the Google Cloud resource * described by the Security Command Center asset. This information is managed * and defined by the Google Cloud resource and cannot be modified by the user. */ export interface IamPolicy { /** * The JSON representation of the Policy associated with the asset. See * https://cloud.google.com/iam/reference/rest/v1/Policy for format details. */ policyBlob?: string; } /** * Represents what's commonly known as an _indicator of compromise_ (IoC) in * computer forensics. This is an artifact observed on a network or in an * operating system that, with high confidence, indicates a computer intrusion. * For more information, see [Indicator of * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). */ export interface Indicator { /** * List of domains associated to the Finding. */ domains?: string[]; /** * The list of IP addresses that are associated with the finding. */ ipAddresses?: string[]; /** * The list of matched signatures indicating that the given process is * present in the environment. */ signatures?: ProcessSignature[]; /** * The list of URIs associated to the Findings. */ uris?: string[]; } /** * Kernel mode rootkit signatures. */ export interface KernelRootkit { /** * Rootkit name, when available. */ name?: string; /** * True if unexpected modifications of kernel code memory are present. */ unexpectedCodeModification?: boolean; /** * True if `ftrace` points are present with callbacks pointing to regions * that are not in the expected kernel or module code range. */ unexpectedFtraceHandler?: boolean; /** * True if interrupt handlers that are are not in the expected kernel or * module code regions are present. */ unexpectedInterruptHandler?: boolean; /** * True if kernel code pages that are not in the expected kernel or module * code regions are present. */ unexpectedKernelCodePages?: boolean; /** * True if `kprobe` points are present with callbacks pointing to regions * that are not in the expected kernel or module code range. */ unexpectedKprobeHandler?: boolean; /** * True if unexpected processes in the scheduler run queue are present. Such * processes are in the run queue, but not in the process task list. */ unexpectedProcessesInRunqueue?: boolean; /** * True if unexpected modifications of kernel read-only data memory are * present. */ unexpectedReadOnlyDataModification?: boolean; /** * True if system call handlers that are are not in the expected kernel or * module code regions are present. */ unexpectedSystemCallHandler?: boolean; } /** * Kubernetes-related attributes. */ export interface Kubernetes { /** * Provides information on any Kubernetes access reviews (privilege checks) * relevant to the finding. */ accessReviews?: AccessReview[]; /** * Provides Kubernetes role binding information for findings that involve * [RoleBindings or * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). */ bindings?: GoogleCloudSecuritycenterV1Binding[]; /** * GKE [node * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) * associated with the finding. This field contains node pool information for * each node, when it is available. */ nodePools?: NodePool[]; /** * Provides Kubernetes * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) * information. */ nodes?: Node[]; /** * Kubernetes objects related to the finding. */ objects?: Object[]; /** * Kubernetes * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) * associated with the finding. This field contains Pod records for each * container that is owned by a Pod. */ pods?: Pod[]; /** * Provides Kubernetes role information for findings that involve [Roles or * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). */ roles?: Role[]; } function serializeKubernetes(data: any): Kubernetes { return { ...data, objects: data["objects"] !== undefined ? data["objects"].map((item: any) => (serializeObject(item))) : undefined, pods: data["pods"] !== undefined ? data["pods"].map((item: any) => (serializePod(item))) : undefined, }; } function deserializeKubernetes(data: any): Kubernetes { return { ...data, objects: data["objects"] !== undefined ? data["objects"].map((item: any) => (deserializeObject(item))) : undefined, pods: data["pods"] !== undefined ? data["pods"].map((item: any) => (deserializePod(item))) : undefined, }; } /** * Represents a generic name-value label. A label has separate name and value * fields to support filtering with the `contains()` function. For more * information, see [Filtering on array-type * fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). */ export interface Label { /** * Name of the label. */ name?: string; /** * Value that corresponds to the label's name. */ value?: string; } /** * Response message for listing assets. */ export interface ListAssetsResponse { /** * Assets matching the list request. */ listAssetsResults?: ListAssetsResult[]; /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * Time used for executing the list request. */ readTime?: Date; /** * The total number of assets matching the query. */ totalSize?: number; } function serializeListAssetsResponse(data: any): ListAssetsResponse { return { ...data, listAssetsResults: data["listAssetsResults"] !== undefined ? data["listAssetsResults"].map((item: any) => (serializeListAssetsResult(item))) : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeListAssetsResponse(data: any): ListAssetsResponse { return { ...data, listAssetsResults: data["listAssetsResults"] !== undefined ? data["listAssetsResults"].map((item: any) => (deserializeListAssetsResult(item))) : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Result containing the Asset and its State. */ export interface ListAssetsResult { /** * Asset matching the search request. */ asset?: Asset; /** * State change of the asset between the points in time. */ stateChange?: | "UNUSED" | "ADDED" | "REMOVED" | "ACTIVE"; } function serializeListAssetsResult(data: any): ListAssetsResult { return { ...data, asset: data["asset"] !== undefined ? serializeAsset(data["asset"]) : undefined, }; } function deserializeListAssetsResult(data: any): ListAssetsResult { return { ...data, asset: data["asset"] !== undefined ? deserializeAsset(data["asset"]) : undefined, }; } /** * Response message for listing the attack paths for a given simulation or * valued resource. */ export interface ListAttackPathsResponse { /** * The attack paths that the attack path simulation identified. */ attackPaths?: AttackPath[]; /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; } /** * Response message for listing BigQuery exports. */ export interface ListBigQueryExportsResponse { /** * The BigQuery exports from the specified parent. */ bigQueryExports?: GoogleCloudSecuritycenterV1BigQueryExport[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response for listing current and descendant resident Event Threat Detection * custom modules. */ export interface ListDescendantEventThreatDetectionCustomModulesResponse { /** * Custom modules belonging to the requested parent. */ eventThreatDetectionCustomModules?: EventThreatDetectionCustomModule[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for listing descendant Security Health Analytics custom * modules. */ export interface ListDescendantSecurityHealthAnalyticsCustomModulesResponse { /** * If not empty, indicates that there may be more custom modules to be * returned. */ nextPageToken?: string; /** * Custom modules belonging to the requested parent and its descendants. */ securityHealthAnalyticsCustomModules?: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule[]; } /** * Response for listing EffectiveEventThreatDetectionCustomModules. */ export interface ListEffectiveEventThreatDetectionCustomModulesResponse { /** * Effective custom modules belonging to the requested parent. */ effectiveEventThreatDetectionCustomModules?: EffectiveEventThreatDetectionCustomModule[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for listing effective Security Health Analytics custom * modules. */ export interface ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { /** * Effective custom modules belonging to the requested parent. */ effectiveSecurityHealthAnalyticsCustomModules?: GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule[]; /** * If not empty, indicates that there may be more effective custom modules to * be returned. */ nextPageToken?: string; } /** * Response for listing Event Threat Detection custom modules. */ export interface ListEventThreatDetectionCustomModulesResponse { /** * Custom modules belonging to the requested parent. */ eventThreatDetectionCustomModules?: EventThreatDetectionCustomModule[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for listing findings. */ export interface ListFindingsResponse { /** * Findings matching the list request. */ listFindingsResults?: ListFindingsResult[]; /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * Time used for executing the list request. */ readTime?: Date; /** * The total number of findings matching the query. */ totalSize?: number; } function serializeListFindingsResponse(data: any): ListFindingsResponse { return { ...data, listFindingsResults: data["listFindingsResults"] !== undefined ? data["listFindingsResults"].map((item: any) => (serializeListFindingsResult(item))) : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeListFindingsResponse(data: any): ListFindingsResponse { return { ...data, listFindingsResults: data["listFindingsResults"] !== undefined ? data["listFindingsResults"].map((item: any) => (deserializeListFindingsResult(item))) : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Result containing the Finding and its StateChange. */ export interface ListFindingsResult { /** * Finding matching the search request. */ finding?: Finding; /** * Output only. Resource that is associated with this finding. */ readonly resource?: Resource; /** * State change of the finding between the points in time. */ stateChange?: | "UNUSED" | "CHANGED" | "UNCHANGED" | "ADDED" | "REMOVED"; } function serializeListFindingsResult(data: any): ListFindingsResult { return { ...data, finding: data["finding"] !== undefined ? serializeFinding(data["finding"]) : undefined, }; } function deserializeListFindingsResult(data: any): ListFindingsResult { return { ...data, finding: data["finding"] !== undefined ? deserializeFinding(data["finding"]) : undefined, }; } /** * Response message for listing mute configs. */ export interface ListMuteConfigsResponse { /** * The mute configs from the specified parent. */ muteConfigs?: GoogleCloudSecuritycenterV1MuteConfig[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } function serializeListMuteConfigsResponse(data: any): ListMuteConfigsResponse { return { ...data, muteConfigs: data["muteConfigs"] !== undefined ? data["muteConfigs"].map((item: any) => (serializeGoogleCloudSecuritycenterV1MuteConfig(item))) : undefined, }; } function deserializeListMuteConfigsResponse(data: any): ListMuteConfigsResponse { return { ...data, muteConfigs: data["muteConfigs"] !== undefined ? data["muteConfigs"].map((item: any) => (deserializeGoogleCloudSecuritycenterV1MuteConfig(item))) : undefined, }; } /** * Response message for listing notification configs. */ export interface ListNotificationConfigsResponse { /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * Notification configs belonging to the requested parent. */ notificationConfigs?: NotificationConfig[]; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; } /** * Response message to list resource value configs */ export interface ListResourceValueConfigsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is empty, there are no subsequent pages. */ nextPageToken?: string; /** * The resource value configs from the specified parent. */ resourceValueConfigs?: GoogleCloudSecuritycenterV1ResourceValueConfig[]; } /** * Response message for listing Security Health Analytics custom modules. */ export interface ListSecurityHealthAnalyticsCustomModulesResponse { /** * If not empty, indicates that there may be more custom modules to be * returned. */ nextPageToken?: string; /** * Custom modules belonging to the requested parent. */ securityHealthAnalyticsCustomModules?: GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule[]; } /** * Response message for listing sources. */ export interface ListSourcesResponse { /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * Sources belonging to the requested parent. */ sources?: Source[]; } /** * Response message for listing the valued resources for a given simulation. */ export interface ListValuedResourcesResponse { /** * Token to retrieve the next page of results, or empty if there are no more * results. */ nextPageToken?: string; /** * The estimated total number of results matching the query. */ totalSize?: number; /** * The valued resources that the attack path simulation identified. */ valuedResources?: ValuedResource[]; } /** * Contains information related to the load balancer associated with the * finding. */ export interface LoadBalancer { /** * The name of the load balancer associated with the finding. */ name?: string; } /** * An individual entry in a log. */ export interface LogEntry { /** * An individual entry in a log stored in Cloud Logging. */ cloudLoggingEntry?: CloudLoggingEntry; } function serializeLogEntry(data: any): LogEntry { return { ...data, cloudLoggingEntry: data["cloudLoggingEntry"] !== undefined ? serializeCloudLoggingEntry(data["cloudLoggingEntry"]) : undefined, }; } function deserializeLogEntry(data: any): LogEntry { return { ...data, cloudLoggingEntry: data["cloudLoggingEntry"] !== undefined ? deserializeCloudLoggingEntry(data["cloudLoggingEntry"]) : undefined, }; } /** * A signature corresponding to memory page hashes. */ export interface MemoryHashSignature { /** * The binary family. */ binaryFamily?: string; /** * The list of memory hash detections contributing to the binary family * match. */ detections?: Detection[]; } /** * MITRE ATT&CK tactics and techniques related to this finding. See: * https://attack.mitre.org */ export interface MitreAttack { /** * Additional MITRE ATT&CK tactics related to this finding, if any. */ additionalTactics?: | "TACTIC_UNSPECIFIED" | "RECONNAISSANCE" | "RESOURCE_DEVELOPMENT" | "INITIAL_ACCESS" | "EXECUTION" | "PERSISTENCE" | "PRIVILEGE_ESCALATION" | "DEFENSE_EVASION" | "CREDENTIAL_ACCESS" | "DISCOVERY" | "LATERAL_MOVEMENT" | "COLLECTION" | "COMMAND_AND_CONTROL" | "EXFILTRATION" | "IMPACT"[]; /** * Additional MITRE ATT&CK techniques related to this finding, if any, along * with any of their respective parent techniques. */ additionalTechniques?: | "TECHNIQUE_UNSPECIFIED" | "MASQUERADING" | "MATCH_LEGITIMATE_NAME_OR_LOCATION" | "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" | "STARTUP_ITEMS" | "NETWORK_SERVICE_DISCOVERY" | "PROCESS_DISCOVERY" | "COMMAND_AND_SCRIPTING_INTERPRETER" | "UNIX_SHELL" | "PYTHON" | "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" | "PERMISSION_GROUPS_DISCOVERY" | "CLOUD_GROUPS" | "INDICATOR_REMOVAL_FILE_DELETION" | "APPLICATION_LAYER_PROTOCOL" | "DNS" | "SOFTWARE_DEPLOYMENT_TOOLS" | "VALID_ACCOUNTS" | "DEFAULT_ACCOUNTS" | "LOCAL_ACCOUNTS" | "CLOUD_ACCOUNTS" | "PROXY" | "EXTERNAL_PROXY" | "MULTI_HOP_PROXY" | "ACCOUNT_MANIPULATION" | "ADDITIONAL_CLOUD_CREDENTIALS" | "SSH_AUTHORIZED_KEYS" | "ADDITIONAL_CONTAINER_CLUSTER_ROLES" | "INGRESS_TOOL_TRANSFER" | "NATIVE_API" | "BRUTE_FORCE" | "SHARED_MODULES" | "ACCESS_TOKEN_MANIPULATION" | "TOKEN_IMPERSONATION_OR_THEFT" | "EXPLOIT_PUBLIC_FACING_APPLICATION" | "DOMAIN_POLICY_MODIFICATION" | "DATA_DESTRUCTION" | "SERVICE_STOP" | "INHIBIT_SYSTEM_RECOVERY" | "RESOURCE_HIJACKING" | "NETWORK_DENIAL_OF_SERVICE" | "CLOUD_SERVICE_DISCOVERY" | "STEAL_APPLICATION_ACCESS_TOKEN" | "ACCOUNT_ACCESS_REMOVAL" | "STEAL_WEB_SESSION_COOKIE" | "CREATE_OR_MODIFY_SYSTEM_PROCESS" | "EVENT_TRIGGERED_EXECUTION" | "ABUSE_ELEVATION_CONTROL_MECHANISM" | "UNSECURED_CREDENTIALS" | "MODIFY_AUTHENTICATION_PROCESS" | "IMPAIR_DEFENSES" | "DISABLE_OR_MODIFY_TOOLS" | "EXFILTRATION_OVER_WEB_SERVICE" | "EXFILTRATION_TO_CLOUD_STORAGE" | "DYNAMIC_RESOLUTION" | "LATERAL_TOOL_TRANSFER" | "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" | "CREATE_SNAPSHOT" | "CLOUD_INFRASTRUCTURE_DISCOVERY" | "OBTAIN_CAPABILITIES" | "ACTIVE_SCANNING" | "SCANNING_IP_BLOCKS" | "CONTAINER_ADMINISTRATION_COMMAND" | "DEPLOY_CONTAINER" | "ESCAPE_TO_HOST" | "CONTAINER_AND_RESOURCE_DISCOVERY" | "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES"[]; /** * The MITRE ATT&CK tactic most closely represented by this finding, if any. */ primaryTactic?: | "TACTIC_UNSPECIFIED" | "RECONNAISSANCE" | "RESOURCE_DEVELOPMENT" | "INITIAL_ACCESS" | "EXECUTION" | "PERSISTENCE" | "PRIVILEGE_ESCALATION" | "DEFENSE_EVASION" | "CREDENTIAL_ACCESS" | "DISCOVERY" | "LATERAL_MOVEMENT" | "COLLECTION" | "COMMAND_AND_CONTROL" | "EXFILTRATION" | "IMPACT"; /** * The MITRE ATT&CK technique most closely represented by this finding, if * any. primary_techniques is a repeated field because there are multiple * levels of MITRE ATT&CK techniques. If the technique most closely * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), * both the sub-technique and its parent technique(s) will be listed (e.g. * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). */ primaryTechniques?: | "TECHNIQUE_UNSPECIFIED" | "MASQUERADING" | "MATCH_LEGITIMATE_NAME_OR_LOCATION" | "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" | "STARTUP_ITEMS" | "NETWORK_SERVICE_DISCOVERY" | "PROCESS_DISCOVERY" | "COMMAND_AND_SCRIPTING_INTERPRETER" | "UNIX_SHELL" | "PYTHON" | "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" | "PERMISSION_GROUPS_DISCOVERY" | "CLOUD_GROUPS" | "INDICATOR_REMOVAL_FILE_DELETION" | "APPLICATION_LAYER_PROTOCOL" | "DNS" | "SOFTWARE_DEPLOYMENT_TOOLS" | "VALID_ACCOUNTS" | "DEFAULT_ACCOUNTS" | "LOCAL_ACCOUNTS" | "CLOUD_ACCOUNTS" | "PROXY" | "EXTERNAL_PROXY" | "MULTI_HOP_PROXY" | "ACCOUNT_MANIPULATION" | "ADDITIONAL_CLOUD_CREDENTIALS" | "SSH_AUTHORIZED_KEYS" | "ADDITIONAL_CONTAINER_CLUSTER_ROLES" | "INGRESS_TOOL_TRANSFER" | "NATIVE_API" | "BRUTE_FORCE" | "SHARED_MODULES" | "ACCESS_TOKEN_MANIPULATION" | "TOKEN_IMPERSONATION_OR_THEFT" | "EXPLOIT_PUBLIC_FACING_APPLICATION" | "DOMAIN_POLICY_MODIFICATION" | "DATA_DESTRUCTION" | "SERVICE_STOP" | "INHIBIT_SYSTEM_RECOVERY" | "RESOURCE_HIJACKING" | "NETWORK_DENIAL_OF_SERVICE" | "CLOUD_SERVICE_DISCOVERY" | "STEAL_APPLICATION_ACCESS_TOKEN" | "ACCOUNT_ACCESS_REMOVAL" | "STEAL_WEB_SESSION_COOKIE" | "CREATE_OR_MODIFY_SYSTEM_PROCESS" | "EVENT_TRIGGERED_EXECUTION" | "ABUSE_ELEVATION_CONTROL_MECHANISM" | "UNSECURED_CREDENTIALS" | "MODIFY_AUTHENTICATION_PROCESS" | "IMPAIR_DEFENSES" | "DISABLE_OR_MODIFY_TOOLS" | "EXFILTRATION_OVER_WEB_SERVICE" | "EXFILTRATION_TO_CLOUD_STORAGE" | "DYNAMIC_RESOLUTION" | "LATERAL_TOOL_TRANSFER" | "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" | "CREATE_SNAPSHOT" | "CLOUD_INFRASTRUCTURE_DISCOVERY" | "OBTAIN_CAPABILITIES" | "ACTIVE_SCANNING" | "SCANNING_IP_BLOCKS" | "CONTAINER_ADMINISTRATION_COMMAND" | "DEPLOY_CONTAINER" | "ESCAPE_TO_HOST" | "CONTAINER_AND_RESOURCE_DISCOVERY" | "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES"[]; /** * The MITRE ATT&CK version referenced by the above fields. E.g. "8". */ version?: string; } /** * Mute information about the finding, including whether the finding has a * static mute or any matching dynamic mute rules. */ export interface MuteInfo { /** * The list of dynamic mute rules that currently match the finding. */ dynamicMuteRecords?: DynamicMuteRecord[]; /** * If set, the static mute applied to this finding. Static mutes override * dynamic mutes. If unset, there is no static mute. */ staticMute?: StaticMute; } function serializeMuteInfo(data: any): MuteInfo { return { ...data, dynamicMuteRecords: data["dynamicMuteRecords"] !== undefined ? data["dynamicMuteRecords"].map((item: any) => (serializeDynamicMuteRecord(item))) : undefined, staticMute: data["staticMute"] !== undefined ? serializeStaticMute(data["staticMute"]) : undefined, }; } function deserializeMuteInfo(data: any): MuteInfo { return { ...data, dynamicMuteRecords: data["dynamicMuteRecords"] !== undefined ? data["dynamicMuteRecords"].map((item: any) => (deserializeDynamicMuteRecord(item))) : undefined, staticMute: data["staticMute"] !== undefined ? deserializeStaticMute(data["staticMute"]) : undefined, }; } /** * Kubernetes nodes associated with the finding. */ export interface Node { /** * [Full resource name](https://google.aip.dev/122#full-resource-names) of * the Compute Engine VM running the cluster node. */ name?: string; } /** * Provides GKE node pool information. */ export interface NodePool { /** * Kubernetes node pool name. */ name?: string; /** * Nodes associated with the finding. */ nodes?: Node[]; } /** * Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise * notebook](https://cloud.google.com/colab/docs/introduction) file, that is * associated with a finding. */ export interface Notebook { /** * The user ID of the latest author to modify the notebook. */ lastAuthor?: string; /** * The name of the notebook. */ name?: string; /** * The most recent time the notebook was updated. */ notebookUpdateTime?: Date; /** * The source notebook service, for example, "Colab Enterprise". */ service?: string; } function serializeNotebook(data: any): Notebook { return { ...data, notebookUpdateTime: data["notebookUpdateTime"] !== undefined ? data["notebookUpdateTime"].toISOString() : undefined, }; } function deserializeNotebook(data: any): Notebook { return { ...data, notebookUpdateTime: data["notebookUpdateTime"] !== undefined ? new Date(data["notebookUpdateTime"]) : undefined, }; } /** * Cloud Security Command Center (Cloud SCC) notification configs. A * notification config is a Cloud SCC resource that contains the configuration * to send notifications for create/update events of findings, assets and etc. */ export interface NotificationConfig { /** * The description of the notification config (max of 1024 characters). */ description?: string; /** * The relative resource name of this notification config. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", * "folders/{folder_id}/notificationConfigs/notify_public_bucket", or * "projects/{project_id}/notificationConfigs/notify_public_bucket". */ name?: string; /** * The Pub/Sub topic to send notifications to. Its format is * "projects/[project_id]/topics/[topic]". */ pubsubTopic?: string; /** * Output only. The service account that needs "pubsub.topics.publish" * permission to publish to the Pub/Sub topic. */ readonly serviceAccount?: string; /** * The config for triggering streaming-based notifications. */ streamingConfig?: StreamingConfig; } /** * Kubernetes object related to the finding, uniquely identified by GKNN. Used * if the object Kind is not one of Pod, Node, NodePool, Binding, or * AccessReview. */ export interface Object { /** * Pod containers associated with this finding, if any. */ containers?: Container[]; /** * Kubernetes object group, such as "policy.k8s.io/v1". */ group?: string; /** * Kubernetes object kind, such as "Namespace". */ kind?: string; /** * Kubernetes object name. For details see * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. */ name?: string; /** * Kubernetes object namespace. Must be a valid DNS label. Named "ns" to * avoid collision with C++ namespace keyword. For details see * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. */ ns?: string; } function serializeObject(data: any): Object { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (serializeContainer(item))) : undefined, }; } function deserializeObject(data: any): Object { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (deserializeContainer(item))) : undefined, }; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Additional options for SecurityCenter#organizationsAssetsList. */ export interface OrganizationsAssetsListOptions { /** * When compare_duration is set, the ListAssetsResult's "state_change" * attribute is updated to indicate whether the asset was added, removed, or * remained present during the compare_duration period of time that precedes * the read_time. This is the time between (read_time - compare_duration) and * read_time. The state_change value is derived based on the presence of the * asset at the two points in time. Intermediate state changes between the two * times don't affect the result. For example, the results aren't affected if * the asset is removed and re-created again. Possible "state_change" values * when compare_duration is specified: * "ADDED": indicates that the asset was * not present at the start of compare_duration, but present at read_time. * * "REMOVED": indicates that the asset was present at the start of * compare_duration, but not present at read_time. * "ACTIVE": indicates that * the asset was present at both the start and the end of the time period * defined by compare_duration and read_time. If compare_duration is not * specified, then the only possible state_change is "UNUSED", which will be * the state_change set for all assets present at read_time. */ compareDuration?: number /* Duration */; /** * A field mask to specify the ListAssetsResult fields to be listed in the * response. An empty field mask will list all fields. */ fieldMask?: string /* FieldMask */; /** * Expression that defines the filter to apply across assets. The expression * is a list of zero or more restrictions combined via logical operators `AND` * and `OR`. Parentheses are supported, and `OR` has higher precedence than * `AND`. Restrictions have the form ` ` and may have a `-` character in front * of them to indicate negation. The fields map to those defined in the Asset * resource. Examples include: * name * * security_center_properties.resource_name * resource_properties.a_property * * security_marks.marks.marka The supported operators are: * `=` for all value * types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring * matching, for strings. The supported value types are: * string literals in * quotes. * integer literals without quotes. * boolean literals `true` and * `false` without quotes. The following are the allowed field and operator * combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: * This should be milliseconds since epoch or an RFC3339 string. Examples: * `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds * since epoch or an RFC3339 string. Examples: `create_time = * "2019-06-10T16:07:18-07:00"` `create_time = 1560208038000` * * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` For example, * `resource_properties.size = 100` is a valid filter string. Use a partial * match on the empty string to filter based on a property existing: * `resource_properties.my_property : ""` Use a negated partial match on the * empty string to filter based on a property not existing: * `-resource_properties.my_property : ""` */ filter?: string; /** * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For * example: "name,resource_properties.a_property". The default sorting order * is ascending. To specify descending order for a field, a suffix " desc" * should be appended to the field name. For example: "name * desc,resource_properties.a_property". Redundant space characters in the * syntax are insignificant. "name desc,resource_properties.a_property" and " * name desc , resource_properties.a_property " are equivalent. The following * fields are supported: name update_time resource_properties * security_marks.marks security_center_properties.resource_name * security_center_properties.resource_display_name * security_center_properties.resource_parent * security_center_properties.resource_parent_display_name * security_center_properties.resource_project * security_center_properties.resource_project_display_name * security_center_properties.resource_type */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListAssetsResponse`; indicates that this * is a continuation of a prior `ListAssets` call, and that the system should * return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering assets. The filter is * limited to assets existing at the supplied time and their values are those * at that specific time. Absence of this field will default to the API's * version of NOW. */ readTime?: Date; } function serializeOrganizationsAssetsListOptions(data: any): OrganizationsAssetsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeOrganizationsAssetsListOptions(data: any): OrganizationsAssetsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Additional options for * SecurityCenter#organizationsAssetsUpdateSecurityMarks. */ export interface OrganizationsAssetsUpdateSecurityMarksOptions { /** * The time at which the updated SecurityMarks take effect. If not set uses * current server time. Updates will be applied to the SecurityMarks that are * active immediately preceding this time. Must be earlier or equal to the * server time. */ startTime?: Date; /** * The FieldMask to use when updating the security marks resource. The field * mask must not contain duplicate fields. If empty or set to "marks", all * marks will be replaced. Individual marks can be updated using "marks.". */ updateMask?: string /* FieldMask */; } function serializeOrganizationsAssetsUpdateSecurityMarksOptions(data: any): OrganizationsAssetsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsAssetsUpdateSecurityMarksOptions(data: any): OrganizationsAssetsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#organizationsBigQueryExportsCreate. */ export interface OrganizationsBigQueryExportsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must consist of only lowercase letters, numbers, and hyphens, * must start with a letter, must end with either a letter or a number, and * must be 63 characters or less. */ bigQueryExportId?: string; } /** * Additional options for SecurityCenter#organizationsBigQueryExportsList. */ export interface OrganizationsBigQueryExportsListOptions { /** * The maximum number of configs to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListBigQueryExports` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListBigQueryExports` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for SecurityCenter#organizationsBigQueryExportsPatch. */ export interface OrganizationsBigQueryExportsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsBigQueryExportsPatchOptions(data: any): OrganizationsBigQueryExportsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsBigQueryExportsPatchOptions(data: any): OrganizationsBigQueryExportsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * User specified settings that are attached to the Security Command Center * organization. */ export interface OrganizationSettings { /** * The configuration used for Asset Discovery runs. */ assetDiscoveryConfig?: AssetDiscoveryConfig; /** * A flag that indicates if Asset Discovery should be enabled. If the flag is * set to `true`, then discovery of assets will occur. If it is set to * `false`, all historical assets will remain, but discovery of future assets * will not occur. */ enableAssetDiscovery?: boolean; /** * The relative resource name of the settings. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: "organizations/{organization_id}/organizationSettings". */ name?: string; } /** * Additional options for * SecurityCenter#organizationsEventThreatDetectionSettingsCustomModulesListDescendant. */ export interface OrganizationsEventThreatDetectionSettingsCustomModulesListDescendantOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListDescendantEventThreatDetectionCustomModules` must match * the call that provided the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsEventThreatDetectionSettingsCustomModulesList. */ export interface OrganizationsEventThreatDetectionSettingsCustomModulesListOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListEventThreatDetectionCustomModules` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsEventThreatDetectionSettingsCustomModulesPatch. */ export interface OrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions(data: any): OrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions(data: any): OrganizationsEventThreatDetectionSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#organizationsEventThreatDetectionSettingsEffectiveCustomModulesList. */ export interface OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesListOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListEffectiveEventThreatDetectionCustomModules` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsLocationsMuteConfigsPatch. */ export interface OrganizationsLocationsMuteConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsLocationsMuteConfigsPatchOptions(data: any): OrganizationsLocationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsLocationsMuteConfigsPatchOptions(data: any): OrganizationsLocationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#organizationsMuteConfigsCreate. */ export interface OrganizationsMuteConfigsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must consist of only lowercase letters, numbers, and hyphens, * must start with a letter, must end with either a letter or a number, and * must be 63 characters or less. */ muteConfigId?: string; } /** * Additional options for SecurityCenter#organizationsMuteConfigsList. */ export interface OrganizationsMuteConfigsListOptions { /** * The maximum number of configs to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListMuteConfigs` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListMuteConfigs` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for SecurityCenter#organizationsMuteConfigsPatch. */ export interface OrganizationsMuteConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsMuteConfigsPatchOptions(data: any): OrganizationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsMuteConfigsPatchOptions(data: any): OrganizationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#organizationsNotificationConfigsCreate. */ export interface OrganizationsNotificationConfigsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must be between 1 and 128 characters and contain alphanumeric * characters, underscores, or hyphens only. */ configId?: string; } /** * Additional options for SecurityCenter#organizationsNotificationConfigsList. */ export interface OrganizationsNotificationConfigsListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListNotificationConfigsResponse`; * indicates that this is a continuation of a prior `ListNotificationConfigs` * call, and that the system should return the next page of data. */ pageToken?: string; } /** * Additional options for SecurityCenter#organizationsNotificationConfigsPatch. */ export interface OrganizationsNotificationConfigsPatchOptions { /** * The FieldMask to use when updating the notification config. If empty all * mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsNotificationConfigsPatchOptions(data: any): OrganizationsNotificationConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsNotificationConfigsPatchOptions(data: any): OrganizationsNotificationConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#organizationsOperationsList. */ export interface OrganizationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for SecurityCenter#organizationsResourceValueConfigsList. */ export interface OrganizationsResourceValueConfigsListOptions { /** * The number of results to return. The service may return fewer than this * value. If unspecified, at most 10 configs will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListResourceValueConfigs` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListResourceValueConfigs` must match the call that * provided the page token. page_size can be specified, and the new page_size * will be used. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsResourceValueConfigsPatch. */ export interface OrganizationsResourceValueConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsResourceValueConfigsPatchOptions(data: any): OrganizationsResourceValueConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsResourceValueConfigsPatchOptions(data: any): OrganizationsResourceValueConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#organizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendant. */ export interface OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSecurityHealthAnalyticsSettingsCustomModulesList. */ export interface OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSecurityHealthAnalyticsSettingsCustomModulesPatch. */ export interface OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { /** * The list of fields to be updated. The only fields that can be updated are * `enablement_state` and `custom_config`. If empty or set to the wildcard * value `*`, both `enablement_state` and `custom_config` are updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(data: any): OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(data: any): OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#organizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesList. */ export interface OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSimulationsAttackExposureResultsAttackPathsList. */ export interface OrganizationsSimulationsAttackExposureResultsAttackPathsListOptions { /** * The filter expression that filters the attack path in the response. * Supported fields: * `valued_resources` supports = */ filter?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListAttackPathsResponse`; indicates that * this is a continuation of a prior `ListAttackPaths` call, and that the * system should return the next page of data. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSimulationsAttackExposureResultsValuedResourcesList. */ export interface OrganizationsSimulationsAttackExposureResultsValuedResourcesListOptions { /** * The filter expression that filters the valued resources in the response. * Supported fields: * `resource_value` supports = * `resource_type` supports * = */ filter?: string; /** * Optional. The fields by which to order the valued resources response. * Supported fields: * `exposed_score` * `resource_value` * `resource_type` * * `resource` * `display_name` Values should be a comma separated list of * fields. For example: `exposed_score,resource_value`. The default sorting * order is descending. To specify ascending or descending order for a field, * append a ` ASC` or a ` DESC` suffix, respectively; for example: * `exposed_score DESC`. */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListValuedResourcesResponse`; indicates * that this is a continuation of a prior `ListValuedResources` call, and that * the system should return the next page of data. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSimulationsAttackPathsList. */ export interface OrganizationsSimulationsAttackPathsListOptions { /** * The filter expression that filters the attack path in the response. * Supported fields: * `valued_resources` supports = */ filter?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListAttackPathsResponse`; indicates that * this is a continuation of a prior `ListAttackPaths` call, and that the * system should return the next page of data. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSimulationsValuedResourcesAttackPathsList. */ export interface OrganizationsSimulationsValuedResourcesAttackPathsListOptions { /** * The filter expression that filters the attack path in the response. * Supported fields: * `valued_resources` supports = */ filter?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListAttackPathsResponse`; indicates that * this is a continuation of a prior `ListAttackPaths` call, and that the * system should return the next page of data. */ pageToken?: string; } /** * Additional options for * SecurityCenter#organizationsSimulationsValuedResourcesList. */ export interface OrganizationsSimulationsValuedResourcesListOptions { /** * The filter expression that filters the valued resources in the response. * Supported fields: * `resource_value` supports = * `resource_type` supports * = */ filter?: string; /** * Optional. The fields by which to order the valued resources response. * Supported fields: * `exposed_score` * `resource_value` * `resource_type` * * `resource` * `display_name` Values should be a comma separated list of * fields. For example: `exposed_score,resource_value`. The default sorting * order is descending. To specify ascending or descending order for a field, * append a ` ASC` or a ` DESC` suffix, respectively; for example: * `exposed_score DESC`. */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListValuedResourcesResponse`; indicates * that this is a continuation of a prior `ListValuedResources` call, and that * the system should return the next page of data. */ pageToken?: string; } /** * Additional options for SecurityCenter#organizationsSourcesFindingsCreate. */ export interface OrganizationsSourcesFindingsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must be alphanumeric and less than or equal to 32 characters and * greater than 0 characters in length. */ findingId?: string; } /** * Additional options for * SecurityCenter#organizationsSourcesFindingsExternalSystemsPatch. */ export interface OrganizationsSourcesFindingsExternalSystemsPatchOptions { /** * The FieldMask to use when updating the external system resource. If empty * all mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsSourcesFindingsExternalSystemsPatchOptions(data: any): OrganizationsSourcesFindingsExternalSystemsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsSourcesFindingsExternalSystemsPatchOptions(data: any): OrganizationsSourcesFindingsExternalSystemsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#organizationsSourcesFindingsList. */ export interface OrganizationsSourcesFindingsListOptions { /** * When compare_duration is set, the ListFindingsResult's "state_change" * attribute is updated to indicate whether the finding had its state changed, * the finding's state remained unchanged, or if the finding was added in any * state during the compare_duration period of time that precedes the * read_time. This is the time between (read_time - compare_duration) and * read_time. The state_change value is derived based on the presence and * state of the finding at the two points in time. Intermediate state changes * between the two times don't affect the result. For example, the results * aren't affected if the finding is made inactive and then active again. * Possible "state_change" values when compare_duration is specified: * * "CHANGED": indicates that the finding was present and matched the given * filter at the start of compare_duration, but changed its state at * read_time. * "UNCHANGED": indicates that the finding was present and * matched the given filter at the start of compare_duration and did not * change state at read_time. * "ADDED": indicates that the finding did not * match the given filter or was not present at the start of compare_duration, * but was present at read_time. * "REMOVED": indicates that the finding was * present and matched the filter at the start of compare_duration, but did * not match the filter at read_time. If compare_duration is not specified, * then the only possible state_change is "UNUSED", which will be the * state_change set for all findings present at read_time. */ compareDuration?: number /* Duration */; /** * A field mask to specify the Finding fields to be listed in the response. * An empty field mask will list all fields. */ fieldMask?: string /* FieldMask */; /** * Expression that defines the filter to apply across findings. The * expression is a list of one or more restrictions combined via logical * operators `AND` and `OR`. Parentheses are supported, and `OR` has higher * precedence than `AND`. Restrictions have the form ` ` and may have a `-` * character in front of them to indicate negation. Examples include: * name * * source_properties.a_property * security_marks.marks.marka The supported * operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for * integer values. * `:`, meaning substring matching, for strings. The * supported value types are: * string literals in quotes. * integer literals * without quotes. * boolean literals `true` and `false` without quotes. The * following field and operator combinations are supported: * name: `=` * * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: * `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time = * 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` For example, `source_properties.size = 100` is a valid filter * string. Use a partial match on the empty string to filter based on a * property existing: `source_properties.my_property : ""` Use a negated * partial match on the empty string to filter based on a property not * existing: `-source_properties.my_property : ""` * resource: * * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, * `:` */ filter?: string; /** * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For * example: "name,resource_properties.a_property". The default sorting order * is ascending. To specify descending order for a field, a suffix " desc" * should be appended to the field name. For example: "name * desc,source_properties.a_property". Redundant space characters in the * syntax are insignificant. "name desc,source_properties.a_property" and " * name desc , source_properties.a_property " are equivalent. The following * fields are supported: name parent state category resource_name event_time * source_properties security_marks.marks */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListFindingsResponse`; indicates that this * is a continuation of a prior `ListFindings` call, and that the system * should return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. */ readTime?: Date; } function serializeOrganizationsSourcesFindingsListOptions(data: any): OrganizationsSourcesFindingsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeOrganizationsSourcesFindingsListOptions(data: any): OrganizationsSourcesFindingsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Additional options for SecurityCenter#organizationsSourcesFindingsPatch. */ export interface OrganizationsSourcesFindingsPatchOptions { /** * The FieldMask to use when updating the finding resource. This field should * not be specified when creating a finding. When updating a finding, an empty * mask is treated as updating all mutable fields and replacing * source_properties. Individual source_properties can be added/updated by * using "source_properties." in the field mask. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsSourcesFindingsPatchOptions(data: any): OrganizationsSourcesFindingsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsSourcesFindingsPatchOptions(data: any): OrganizationsSourcesFindingsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#organizationsSourcesFindingsUpdateSecurityMarks. */ export interface OrganizationsSourcesFindingsUpdateSecurityMarksOptions { /** * The time at which the updated SecurityMarks take effect. If not set uses * current server time. Updates will be applied to the SecurityMarks that are * active immediately preceding this time. Must be earlier or equal to the * server time. */ startTime?: Date; /** * The FieldMask to use when updating the security marks resource. The field * mask must not contain duplicate fields. If empty or set to "marks", all * marks will be replaced. Individual marks can be updated using "marks.". */ updateMask?: string /* FieldMask */; } function serializeOrganizationsSourcesFindingsUpdateSecurityMarksOptions(data: any): OrganizationsSourcesFindingsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsSourcesFindingsUpdateSecurityMarksOptions(data: any): OrganizationsSourcesFindingsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#organizationsSourcesList. */ export interface OrganizationsSourcesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListSourcesResponse`; indicates that this * is a continuation of a prior `ListSources` call, and that the system should * return the next page of data. */ pageToken?: string; } /** * Additional options for SecurityCenter#organizationsSourcesPatch. */ export interface OrganizationsSourcesPatchOptions { /** * The FieldMask to use when updating the source resource. If empty all * mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsSourcesPatchOptions(data: any): OrganizationsSourcesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsSourcesPatchOptions(data: any): OrganizationsSourcesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#organizationsUpdateOrganizationSettings. */ export interface OrganizationsUpdateOrganizationSettingsOptions { /** * The FieldMask to use when updating the settings resource. If empty all * mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeOrganizationsUpdateOrganizationSettingsOptions(data: any): OrganizationsUpdateOrganizationSettingsOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeOrganizationsUpdateOrganizationSettingsOptions(data: any): OrganizationsUpdateOrganizationSettingsOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#organizationsValuedResourcesList. */ export interface OrganizationsValuedResourcesListOptions { /** * The filter expression that filters the valued resources in the response. * Supported fields: * `resource_value` supports = * `resource_type` supports * = */ filter?: string; /** * Optional. The fields by which to order the valued resources response. * Supported fields: * `exposed_score` * `resource_value` * `resource_type` * * `resource` * `display_name` Values should be a comma separated list of * fields. For example: `exposed_score,resource_value`. The default sorting * order is descending. To specify ascending or descending order for a field, * append a ` ASC` or a ` DESC` suffix, respectively; for example: * `exposed_score DESC`. */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListValuedResourcesResponse`; indicates * that this is a continuation of a prior `ListValuedResources` call, and that * the system should return the next page of data. */ pageToken?: string; } /** * Contains information about the org policies associated with the finding. */ export interface OrgPolicy { /** * The resource name of the org policy. Example: * "organizations/{organization_id}/policies/{constraint_name}" */ name?: string; } /** * Package is a generic definition of a package. */ export interface Package { /** * The CPE URI where the vulnerability was detected. */ cpeUri?: string; /** * The name of the package where the vulnerability was detected. */ packageName?: string; /** * Type of package, for example, os, maven, or go. */ packageType?: string; /** * The version of the package. */ packageVersion?: string; } /** * A finding that is associated with this node in the attack path. */ export interface PathNodeAssociatedFinding { /** * Canonical name of the associated findings. Example: * `organizations/123/sources/456/findings/789` */ canonicalFinding?: string; /** * The additional taxonomy group within findings from a given source. */ findingCategory?: string; /** * Full resource name of the finding. */ name?: string; } /** * A Kubernetes Pod. */ export interface Pod { /** * Pod containers associated with this finding, if any. */ containers?: Container[]; /** * Pod labels. For Kubernetes containers, these are applied to the container. */ labels?: Label[]; /** * Kubernetes Pod name. */ name?: string; /** * Kubernetes Pod namespace. */ ns?: string; } function serializePod(data: any): Pod { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (serializeContainer(item))) : undefined, }; } function deserializePod(data: any): Pod { return { ...data, containers: data["containers"] !== undefined ? data["containers"].map((item: any) => (deserializeContainer(item))) : undefined, }; } /** * An Identity and Access Management (IAM) policy, which specifies access * controls for Google Cloud resources. A `Policy` is a collection of * `bindings`. A `binding` binds one or more `members`, or principals, to a * single `role`. Principals can be user accounts, service accounts, Google * groups, and domains (such as G Suite). A `role` is a named list of * permissions; each `role` can be an IAM predefined role or a user-created * custom role. For some types of Google Cloud resources, a `binding` can also * specify a `condition`, which is a logical expression that allows access to a * resource only if the expression evaluates to `true`. A condition can add * constraints based on attributes of the request, the resource, or both. To * learn which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). * **JSON example:** ``` { "bindings": [ { "role": * "roles/resourcemanager.organizationAdmin", "members": [ * "user:mike@example.com", "group:admins@example.com", "domain:google.com", * "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": * "roles/resourcemanager.organizationViewer", "members": [ * "user:eve@example.com" ], "condition": { "title": "expirable access", * "description": "Does not grant access after Sep 2020", "expression": * "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": * "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: * - user:mike@example.com - group:admins@example.com - domain:google.com - * serviceAccount:my-project-id@appspot.gserviceaccount.com role: * roles/resourcemanager.organizationAdmin - members: - user:eve@example.com * role: roles/resourcemanager.organizationViewer condition: title: expirable * access description: Does not grant access after Sep 2020 expression: * request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= * version: 3 ``` For a description of IAM and its features, see the [IAM * documentation](https://cloud.google.com/iam/docs/). */ export interface Policy { /** * Specifies cloud audit logging configuration for this policy. */ auditConfigs?: AuditConfig[]; /** * Associates a list of `members`, or principals, with a `role`. Optionally, * may specify a `condition` that determines how and when the `bindings` are * applied. Each of the `bindings` must contain at least one principal. The * `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of * these principals can be Google groups. Each occurrence of a principal * counts towards these limits. For example, if the `bindings` grant 50 * different roles to `user:alice@example.com`, and not to any other * principal, then you can add another 1,450 principals to the `bindings` in * the `Policy`. */ bindings?: Binding[]; /** * `etag` is used for optimistic concurrency control as a way to help prevent * simultaneous updates of a policy from overwriting each other. It is * strongly suggested that systems make use of the `etag` in the * read-modify-write cycle to perform policy updates in order to avoid race * conditions: An `etag` is returned in the response to `getIamPolicy`, and * systems are expected to put that etag in the request to `setIamPolicy` to * ensure that their change will be applied to the same version of the policy. * **Important:** If you use IAM Conditions, you must include the `etag` field * whenever you call `setIamPolicy`. If you omit this field, then IAM allows * you to overwrite a version `3` policy with a version `1` policy, and all of * the conditions in the version `3` policy are lost. */ etag?: Uint8Array; /** * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. * Requests that specify an invalid value are rejected. Any operation that * affects conditional role bindings must specify version `3`. This * requirement applies to the following operations: * Getting a policy that * includes a conditional role binding * Adding a conditional role binding to * a policy * Changing a conditional role binding in a policy * Removing any * role binding, with or without a condition, from a policy that includes * conditions **Important:** If you use IAM Conditions, you must include the * `etag` field whenever you call `setIamPolicy`. If you omit this field, then * IAM allows you to overwrite a version `3` policy with a version `1` policy, * and all of the conditions in the version `3` policy are lost. If a policy * does not include any conditions, operations on that policy may specify any * valid version or leave the field unset. To learn which resources support * conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ version?: number; } function serializePolicy(data: any): Policy { return { ...data, etag: data["etag"] !== undefined ? encodeBase64(data["etag"]) : undefined, }; } function deserializePolicy(data: any): Policy { return { ...data, etag: data["etag"] !== undefined ? decodeBase64(data["etag"] as string) : undefined, }; } /** * The policy field that violates the deployed posture and its expected and * detected values. */ export interface PolicyDriftDetails { /** * The detected value that violates the deployed posture, for example, * `false` or `allowed_values={"projects/22831892"}`. */ detectedValue?: string; /** * The value of this field that was configured in a posture, for example, * `true` or `allowed_values={"projects/29831892"}`. */ expectedValue?: string; /** * The name of the updated field, for example * constraint.implementation.policy_rules[0].enforce */ field?: string; } /** * A position in the uploaded text version of a module. */ export interface Position { columnNumber?: number; lineNumber?: number; } /** * Represents an operating system process. */ export interface Process { /** * Process arguments as JSON encoded strings. */ args?: string[]; /** * True if `args` is incomplete. */ argumentsTruncated?: boolean; /** * File information for the process executable. */ binary?: File; /** * Process environment variables. */ envVariables?: EnvironmentVariable[]; /** * True if `env_variables` is incomplete. */ envVariablesTruncated?: boolean; /** * File information for libraries loaded by the process. */ libraries?: File[]; /** * The process name, as displayed in utilities like `top` and `ps`. This name * can be accessed through `/proc/[pid]/comm` and changed with * `prctl(PR_SET_NAME)`. */ name?: string; /** * The parent process ID. */ parentPid?: bigint; /** * The process ID. */ pid?: bigint; /** * When the process represents the invocation of a script, `binary` provides * information about the interpreter, while `script` provides information * about the script file provided to the interpreter. */ script?: File; } function serializeProcess(data: any): Process { return { ...data, binary: data["binary"] !== undefined ? serializeFile(data["binary"]) : undefined, libraries: data["libraries"] !== undefined ? data["libraries"].map((item: any) => (serializeFile(item))) : undefined, parentPid: data["parentPid"] !== undefined ? String(data["parentPid"]) : undefined, pid: data["pid"] !== undefined ? String(data["pid"]) : undefined, script: data["script"] !== undefined ? serializeFile(data["script"]) : undefined, }; } function deserializeProcess(data: any): Process { return { ...data, binary: data["binary"] !== undefined ? deserializeFile(data["binary"]) : undefined, libraries: data["libraries"] !== undefined ? data["libraries"].map((item: any) => (deserializeFile(item))) : undefined, parentPid: data["parentPid"] !== undefined ? BigInt(data["parentPid"]) : undefined, pid: data["pid"] !== undefined ? BigInt(data["pid"]) : undefined, script: data["script"] !== undefined ? deserializeFile(data["script"]) : undefined, }; } /** * Indicates what signature matched this process. */ export interface ProcessSignature { /** * Signature indicating that a binary family was matched. */ memoryHashSignature?: MemoryHashSignature; /** * Describes the type of resource associated with the signature. */ signatureType?: | "SIGNATURE_TYPE_UNSPECIFIED" | "SIGNATURE_TYPE_PROCESS" | "SIGNATURE_TYPE_FILE"; /** * Signature indicating that a YARA rule was matched. */ yaraRuleSignature?: YaraRuleSignature; } /** * Additional options for SecurityCenter#projectsAssetsList. */ export interface ProjectsAssetsListOptions { /** * When compare_duration is set, the ListAssetsResult's "state_change" * attribute is updated to indicate whether the asset was added, removed, or * remained present during the compare_duration period of time that precedes * the read_time. This is the time between (read_time - compare_duration) and * read_time. The state_change value is derived based on the presence of the * asset at the two points in time. Intermediate state changes between the two * times don't affect the result. For example, the results aren't affected if * the asset is removed and re-created again. Possible "state_change" values * when compare_duration is specified: * "ADDED": indicates that the asset was * not present at the start of compare_duration, but present at read_time. * * "REMOVED": indicates that the asset was present at the start of * compare_duration, but not present at read_time. * "ACTIVE": indicates that * the asset was present at both the start and the end of the time period * defined by compare_duration and read_time. If compare_duration is not * specified, then the only possible state_change is "UNUSED", which will be * the state_change set for all assets present at read_time. */ compareDuration?: number /* Duration */; /** * A field mask to specify the ListAssetsResult fields to be listed in the * response. An empty field mask will list all fields. */ fieldMask?: string /* FieldMask */; /** * Expression that defines the filter to apply across assets. The expression * is a list of zero or more restrictions combined via logical operators `AND` * and `OR`. Parentheses are supported, and `OR` has higher precedence than * `AND`. Restrictions have the form ` ` and may have a `-` character in front * of them to indicate negation. The fields map to those defined in the Asset * resource. Examples include: * name * * security_center_properties.resource_name * resource_properties.a_property * * security_marks.marks.marka The supported operators are: * `=` for all value * types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring * matching, for strings. The supported value types are: * string literals in * quotes. * integer literals without quotes. * boolean literals `true` and * `false` without quotes. The following are the allowed field and operator * combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: * This should be milliseconds since epoch or an RFC3339 string. Examples: * `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds * since epoch or an RFC3339 string. Examples: `create_time = * "2019-06-10T16:07:18-07:00"` `create_time = 1560208038000` * * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` For example, * `resource_properties.size = 100` is a valid filter string. Use a partial * match on the empty string to filter based on a property existing: * `resource_properties.my_property : ""` Use a negated partial match on the * empty string to filter based on a property not existing: * `-resource_properties.my_property : ""` */ filter?: string; /** * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For * example: "name,resource_properties.a_property". The default sorting order * is ascending. To specify descending order for a field, a suffix " desc" * should be appended to the field name. For example: "name * desc,resource_properties.a_property". Redundant space characters in the * syntax are insignificant. "name desc,resource_properties.a_property" and " * name desc , resource_properties.a_property " are equivalent. The following * fields are supported: name update_time resource_properties * security_marks.marks security_center_properties.resource_name * security_center_properties.resource_display_name * security_center_properties.resource_parent * security_center_properties.resource_parent_display_name * security_center_properties.resource_project * security_center_properties.resource_project_display_name * security_center_properties.resource_type */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListAssetsResponse`; indicates that this * is a continuation of a prior `ListAssets` call, and that the system should * return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering assets. The filter is * limited to assets existing at the supplied time and their values are those * at that specific time. Absence of this field will default to the API's * version of NOW. */ readTime?: Date; } function serializeProjectsAssetsListOptions(data: any): ProjectsAssetsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeProjectsAssetsListOptions(data: any): ProjectsAssetsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Additional options for SecurityCenter#projectsAssetsUpdateSecurityMarks. */ export interface ProjectsAssetsUpdateSecurityMarksOptions { /** * The time at which the updated SecurityMarks take effect. If not set uses * current server time. Updates will be applied to the SecurityMarks that are * active immediately preceding this time. Must be earlier or equal to the * server time. */ startTime?: Date; /** * The FieldMask to use when updating the security marks resource. The field * mask must not contain duplicate fields. If empty or set to "marks", all * marks will be replaced. Individual marks can be updated using "marks.". */ updateMask?: string /* FieldMask */; } function serializeProjectsAssetsUpdateSecurityMarksOptions(data: any): ProjectsAssetsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsAssetsUpdateSecurityMarksOptions(data: any): ProjectsAssetsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#projectsBigQueryExportsCreate. */ export interface ProjectsBigQueryExportsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must consist of only lowercase letters, numbers, and hyphens, * must start with a letter, must end with either a letter or a number, and * must be 63 characters or less. */ bigQueryExportId?: string; } /** * Additional options for SecurityCenter#projectsBigQueryExportsList. */ export interface ProjectsBigQueryExportsListOptions { /** * The maximum number of configs to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListBigQueryExports` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListBigQueryExports` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for SecurityCenter#projectsBigQueryExportsPatch. */ export interface ProjectsBigQueryExportsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsBigQueryExportsPatchOptions(data: any): ProjectsBigQueryExportsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsBigQueryExportsPatchOptions(data: any): ProjectsBigQueryExportsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#projectsEventThreatDetectionSettingsCustomModulesListDescendant. */ export interface ProjectsEventThreatDetectionSettingsCustomModulesListDescendantOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListDescendantEventThreatDetectionCustomModules` must match * the call that provided the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#projectsEventThreatDetectionSettingsCustomModulesList. */ export interface ProjectsEventThreatDetectionSettingsCustomModulesListOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListEventThreatDetectionCustomModules` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for * SecurityCenter#projectsEventThreatDetectionSettingsCustomModulesPatch. */ export interface ProjectsEventThreatDetectionSettingsCustomModulesPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsEventThreatDetectionSettingsCustomModulesPatchOptions(data: any): ProjectsEventThreatDetectionSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsEventThreatDetectionSettingsCustomModulesPatchOptions(data: any): ProjectsEventThreatDetectionSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#projectsEventThreatDetectionSettingsEffectiveCustomModulesList. */ export interface ProjectsEventThreatDetectionSettingsEffectiveCustomModulesListOptions { /** * The maximum number of modules to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListEffectiveEventThreatDetectionCustomModules` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for SecurityCenter#projectsLocationsMuteConfigsPatch. */ export interface ProjectsLocationsMuteConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsMuteConfigsPatchOptions(data: any): ProjectsLocationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsMuteConfigsPatchOptions(data: any): ProjectsLocationsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#projectsMuteConfigsCreate. */ export interface ProjectsMuteConfigsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must consist of only lowercase letters, numbers, and hyphens, * must start with a letter, must end with either a letter or a number, and * must be 63 characters or less. */ muteConfigId?: string; } /** * Additional options for SecurityCenter#projectsMuteConfigsList. */ export interface ProjectsMuteConfigsListOptions { /** * The maximum number of configs to return. The service may return fewer than * this value. If unspecified, at most 10 configs will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListMuteConfigs` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListMuteConfigs` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for SecurityCenter#projectsMuteConfigsPatch. */ export interface ProjectsMuteConfigsPatchOptions { /** * The list of fields to be updated. If empty all mutable fields will be * updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsMuteConfigsPatchOptions(data: any): ProjectsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsMuteConfigsPatchOptions(data: any): ProjectsMuteConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#projectsNotificationConfigsCreate. */ export interface ProjectsNotificationConfigsCreateOptions { /** * Required. Unique identifier provided by the client within the parent * scope. It must be between 1 and 128 characters and contain alphanumeric * characters, underscores, or hyphens only. */ configId?: string; } /** * Additional options for SecurityCenter#projectsNotificationConfigsList. */ export interface ProjectsNotificationConfigsListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListNotificationConfigsResponse`; * indicates that this is a continuation of a prior `ListNotificationConfigs` * call, and that the system should return the next page of data. */ pageToken?: string; } /** * Additional options for SecurityCenter#projectsNotificationConfigsPatch. */ export interface ProjectsNotificationConfigsPatchOptions { /** * The FieldMask to use when updating the notification config. If empty all * mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsNotificationConfigsPatchOptions(data: any): ProjectsNotificationConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsNotificationConfigsPatchOptions(data: any): ProjectsNotificationConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#projectsSecurityHealthAnalyticsSettingsCustomModulesListDescendant. */ export interface ProjectsSecurityHealthAnalyticsSettingsCustomModulesListDescendantOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#projectsSecurityHealthAnalyticsSettingsCustomModulesList. */ export interface ProjectsSecurityHealthAnalyticsSettingsCustomModulesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#projectsSecurityHealthAnalyticsSettingsCustomModulesPatch. */ export interface ProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { /** * The list of fields to be updated. The only fields that can be updated are * `enablement_state` and `custom_config`. If empty or set to the wildcard * value `*`, both `enablement_state` and `custom_config` are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(data: any): ProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions(data: any): ProjectsSecurityHealthAnalyticsSettingsCustomModulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#projectsSecurityHealthAnalyticsSettingsEffectiveCustomModulesList. */ export interface ProjectsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last call indicating a continuation */ pageToken?: string; } /** * Additional options for * SecurityCenter#projectsSourcesFindingsExternalSystemsPatch. */ export interface ProjectsSourcesFindingsExternalSystemsPatchOptions { /** * The FieldMask to use when updating the external system resource. If empty * all mutable fields will be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsSourcesFindingsExternalSystemsPatchOptions(data: any): ProjectsSourcesFindingsExternalSystemsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsSourcesFindingsExternalSystemsPatchOptions(data: any): ProjectsSourcesFindingsExternalSystemsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#projectsSourcesFindingsList. */ export interface ProjectsSourcesFindingsListOptions { /** * When compare_duration is set, the ListFindingsResult's "state_change" * attribute is updated to indicate whether the finding had its state changed, * the finding's state remained unchanged, or if the finding was added in any * state during the compare_duration period of time that precedes the * read_time. This is the time between (read_time - compare_duration) and * read_time. The state_change value is derived based on the presence and * state of the finding at the two points in time. Intermediate state changes * between the two times don't affect the result. For example, the results * aren't affected if the finding is made inactive and then active again. * Possible "state_change" values when compare_duration is specified: * * "CHANGED": indicates that the finding was present and matched the given * filter at the start of compare_duration, but changed its state at * read_time. * "UNCHANGED": indicates that the finding was present and * matched the given filter at the start of compare_duration and did not * change state at read_time. * "ADDED": indicates that the finding did not * match the given filter or was not present at the start of compare_duration, * but was present at read_time. * "REMOVED": indicates that the finding was * present and matched the filter at the start of compare_duration, but did * not match the filter at read_time. If compare_duration is not specified, * then the only possible state_change is "UNUSED", which will be the * state_change set for all findings present at read_time. */ compareDuration?: number /* Duration */; /** * A field mask to specify the Finding fields to be listed in the response. * An empty field mask will list all fields. */ fieldMask?: string /* FieldMask */; /** * Expression that defines the filter to apply across findings. The * expression is a list of one or more restrictions combined via logical * operators `AND` and `OR`. Parentheses are supported, and `OR` has higher * precedence than `AND`. Restrictions have the form ` ` and may have a `-` * character in front of them to indicate negation. Examples include: * name * * source_properties.a_property * security_marks.marks.marka The supported * operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for * integer values. * `:`, meaning substring matching, for strings. The * supported value types are: * string literals in quotes. * integer literals * without quotes. * boolean literals `true` and `false` without quotes. The * following field and operator combinations are supported: * name: `=` * * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: * `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time = * 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, * `>=`, `<=` For example, `source_properties.size = 100` is a valid filter * string. Use a partial match on the empty string to filter based on a * property existing: `source_properties.my_property : ""` Use a negated * partial match on the empty string to filter based on a property not * existing: `-source_properties.my_property : ""` * resource: * * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, * `:` */ filter?: string; /** * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For * example: "name,resource_properties.a_property". The default sorting order * is ascending. To specify descending order for a field, a suffix " desc" * should be appended to the field name. For example: "name * desc,source_properties.a_property". Redundant space characters in the * syntax are insignificant. "name desc,source_properties.a_property" and " * name desc , source_properties.a_property " are equivalent. The following * fields are supported: name parent state category resource_name event_time * source_properties security_marks.marks */ orderBy?: string; /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListFindingsResponse`; indicates that this * is a continuation of a prior `ListFindings` call, and that the system * should return the next page of data. */ pageToken?: string; /** * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. */ readTime?: Date; } function serializeProjectsSourcesFindingsListOptions(data: any): ProjectsSourcesFindingsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? data["readTime"].toISOString() : undefined, }; } function deserializeProjectsSourcesFindingsListOptions(data: any): ProjectsSourcesFindingsListOptions { return { ...data, compareDuration: data["compareDuration"] !== undefined ? data["compareDuration"] : undefined, fieldMask: data["fieldMask"] !== undefined ? data["fieldMask"] : undefined, readTime: data["readTime"] !== undefined ? new Date(data["readTime"]) : undefined, }; } /** * Additional options for SecurityCenter#projectsSourcesFindingsPatch. */ export interface ProjectsSourcesFindingsPatchOptions { /** * The FieldMask to use when updating the finding resource. This field should * not be specified when creating a finding. When updating a finding, an empty * mask is treated as updating all mutable fields and replacing * source_properties. Individual source_properties can be added/updated by * using "source_properties." in the field mask. */ updateMask?: string /* FieldMask */; } function serializeProjectsSourcesFindingsPatchOptions(data: any): ProjectsSourcesFindingsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsSourcesFindingsPatchOptions(data: any): ProjectsSourcesFindingsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SecurityCenter#projectsSourcesFindingsUpdateSecurityMarks. */ export interface ProjectsSourcesFindingsUpdateSecurityMarksOptions { /** * The time at which the updated SecurityMarks take effect. If not set uses * current server time. Updates will be applied to the SecurityMarks that are * active immediately preceding this time. Must be earlier or equal to the * server time. */ startTime?: Date; /** * The FieldMask to use when updating the security marks resource. The field * mask must not contain duplicate fields. If empty or set to "marks", all * marks will be replaced. Individual marks can be updated using "marks.". */ updateMask?: string /* FieldMask */; } function serializeProjectsSourcesFindingsUpdateSecurityMarksOptions(data: any): ProjectsSourcesFindingsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsSourcesFindingsUpdateSecurityMarksOptions(data: any): ProjectsSourcesFindingsUpdateSecurityMarksOptions { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SecurityCenter#projectsSourcesList. */ export interface ProjectsSourcesListOptions { /** * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. */ pageSize?: number; /** * The value returned by the last `ListSourcesResponse`; indicates that this * is a continuation of a prior `ListSources` call, and that the system should * return the next page of data. */ pageToken?: string; } /** * Additional Links */ export interface Reference { /** * Source of the reference e.g. NVD */ source?: string; /** * Uri for the mentioned source e.g. * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. */ uri?: string; } /** * Information about the requests relevant to the finding. */ export interface Requests { /** * Allowed RPS (requests per second) over the long term. */ longTermAllowed?: number; /** * Denied RPS (requests per second) over the long term. */ longTermDenied?: number; /** * For 'Increasing deny ratio', the ratio is the denied traffic divided by * the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed * traffic in the short term divided by allowed traffic in the long term. */ ratio?: number; /** * Allowed RPS (requests per second) in the short term. */ shortTermAllowed?: number; } /** * Information related to the Google Cloud resource that is associated with * this finding. */ export interface Resource { /** * The AWS metadata associated with the finding. */ awsMetadata?: AwsMetadata; /** * The Azure metadata associated with the finding. */ azureMetadata?: AzureMetadata; /** * Indicates which cloud provider the finding is from. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * The human readable name of the resource. */ displayName?: string; /** * 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?: Folder[]; /** * The region or location of the service (if applicable). */ location?: string; /** * The full resource name of the resource. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ name?: string; /** * Indicates which organization / tenant the finding is for. */ organization?: string; /** * The human readable name of resource's parent. */ parentDisplayName?: string; /** * The full resource name of resource's parent. */ parentName?: string; /** * The project ID that the resource belongs to. */ projectDisplayName?: string; /** * The full resource name of project that the resource belongs to. */ projectName?: string; /** * Provides the path to the resource within the resource hierarchy. */ resourcePath?: ResourcePath; /** * A string representation of the resource path. For Google Cloud, it has the * format of * `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` * where there can be any number of folders. For AWS, it has the format of * `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` * where there can be any number of organizational units. For Azure, it has * the format of * `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` * where there can be any number of management groups. */ resourcePathString?: string; /** * The service or resource provider associated with the resource. */ service?: string; /** * The full resource type of the resource. */ type?: string; } /** * Represents the path of resources leading up to the resource this finding is * about. */ export interface ResourcePath { /** * The list of nodes that make the up resource path, ordered from lowest * level to highest level. */ nodes?: ResourcePathNode[]; } /** * A node within the resource path. Each node represents a resource within the * resource hierarchy. */ export interface ResourcePathNode { /** * The display name of the resource this node represents. */ displayName?: string; /** * The ID of the resource this node represents. */ id?: string; /** * The type of resource this node represents. */ nodeType?: | "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" | "GCP_ORGANIZATION" | "GCP_FOLDER" | "GCP_PROJECT" | "AWS_ORGANIZATION" | "AWS_ORGANIZATIONAL_UNIT" | "AWS_ACCOUNT" | "AZURE_MANAGEMENT_GROUP" | "AZURE_SUBSCRIPTION" | "AZURE_RESOURCE_GROUP"; } /** * Metadata about a ResourceValueConfig. For example, id and name. */ export interface ResourceValueConfigMetadata { /** * Resource value config name */ name?: string; } /** * Kubernetes Role or ClusterRole. */ export interface Role { /** * Role type. */ kind?: | "KIND_UNSPECIFIED" | "ROLE" | "CLUSTER_ROLE"; /** * Role name. */ name?: string; /** * Role namespace. */ ns?: string; } /** * Request message for running asset discovery for an organization. */ export interface RunAssetDiscoveryRequest { } /** * SecurityBulletin are notifications of vulnerabilities of Google products. */ export interface SecurityBulletin { /** * ID of the bulletin corresponding to the vulnerability. */ bulletinId?: string; /** * Submission time of this Security Bulletin. */ submissionTime?: Date; /** * This represents a version that the cluster receiving this notification * should be upgraded to, based on its current version. For example, 1.15.0 */ suggestedUpgradeVersion?: string; } function serializeSecurityBulletin(data: any): SecurityBulletin { return { ...data, submissionTime: data["submissionTime"] !== undefined ? data["submissionTime"].toISOString() : undefined, }; } function deserializeSecurityBulletin(data: any): SecurityBulletin { return { ...data, submissionTime: data["submissionTime"] !== undefined ? new Date(data["submissionTime"]) : undefined, }; } /** * Security Command Center managed properties. These properties are managed by * Security Command Center and cannot be modified by the user. */ export interface SecurityCenterProperties { /** * 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?: Folder[]; /** * The user defined display name for this resource. */ resourceDisplayName?: string; /** * The full resource name of the Google Cloud resource this asset represents. * This field is immutable after create time. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ resourceName?: string; /** * Owners of the Google Cloud resource. */ resourceOwners?: string[]; /** * The full resource name of the immediate parent of the resource. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ resourceParent?: string; /** * The user defined display name for the parent of this resource. */ resourceParentDisplayName?: string; /** * The full resource name of the project the resource belongs to. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name */ resourceProject?: string; /** * The user defined display name for the project of this resource. */ resourceProjectDisplayName?: string; /** * The type of the Google Cloud resource. Examples include: APPLICATION, * PROJECT, and ORGANIZATION. This is a case insensitive field defined by * Security Command Center and/or the producer of the resource and is * immutable after create time. */ resourceType?: string; } /** * 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 SecurityMarks { /** * The canonical name of the marks. Examples: * "organizations/{organization_id}/assets/{asset_id}/securityMarks" * "folders/{folder_id}/assets/{asset_id}/securityMarks" * "projects/{project_number}/assets/{asset_id}/securityMarks" * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" */ canonicalName?: string; /** * 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 }; /** * 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; } /** * Information about the [Google Cloud Armor security * policy](https://cloud.google.com/armor/docs/security-policy-overview) * relevant to the finding. */ export interface SecurityPolicy { /** * The name of the Google Cloud Armor security policy, for example, * "my-security-policy". */ name?: string; /** * Whether or not the associated rule or policy is in preview mode. */ preview?: boolean; /** * The type of Google Cloud Armor security policy for example, 'backend * security policy', 'edge security policy', 'network edge security policy', * or 'always-on DDoS protection'. */ type?: string; } /** * Represents a posture that is deployed on Google Cloud by the Security * Command Center Posture Management service. A posture contains one or more * policy sets. A policy set is a group of policies that enforce a set of * security rules on Google Cloud. */ export interface SecurityPosture { /** * The name of the updated policy, for example, * `projects/{project_id}/policies/{constraint_name}`. */ changedPolicy?: string; /** * Name of the posture, for example, `CIS-Posture`. */ name?: string; /** * The ID of the updated policy, for example, `compute-policy-1`. */ policy?: string; /** * The details about a change in an updated policy that violates the deployed * posture. */ policyDriftDetails?: PolicyDriftDetails[]; /** * The name of the updated policyset, for example, `cis-policyset`. */ policySet?: string; /** * The name of the posture deployment, for example, * `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. */ postureDeployment?: string; /** * The project, folder, or organization on which the posture is deployed, for * example, `projects/{project_number}`. */ postureDeploymentResource?: string; /** * The version of the posture, for example, `c7cfa2a8`. */ revisionId?: string; } /** * Identity delegation history of an authenticated service account. */ export interface ServiceAccountDelegationInfo { /** * The email address of a Google account. */ principalEmail?: string; /** * A string representing the principal_subject associated with the identity. * As compared to `principal_email`, supports principals that aren't * associated with email addresses, such as third party principals. For most * identities, the format will be `principal://iam.googleapis.com/{identity * pool name}/subjects/{subject}` except for some GKE identities * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy * format `serviceAccount:{identity pool name}[{subject}]` */ principalSubject?: string; } /** * Request message for updating a finding's state. */ export interface SetFindingStateRequest { /** * Optional. The time at which the updated state takes effect. If unset, * defaults to the request time. */ startTime?: Date; /** * Required. The desired State of the finding. */ state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "INACTIVE"; } function serializeSetFindingStateRequest(data: any): SetFindingStateRequest { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeSetFindingStateRequest(data: any): SetFindingStateRequest { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Request message for `SetIamPolicy` method. */ export interface SetIamPolicyRequest { /** * 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 Google Cloud services (such as Projects) might reject them. */ policy?: 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"` */ updateMask?: string /* FieldMask */; } function serializeSetIamPolicyRequest(data: any): SetIamPolicyRequest { return { ...data, policy: data["policy"] !== undefined ? serializePolicy(data["policy"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeSetIamPolicyRequest(data: any): SetIamPolicyRequest { return { ...data, policy: data["policy"] !== undefined ? deserializePolicy(data["policy"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Request message for updating a finding's mute status. */ export interface SetMuteRequest { /** * Required. The desired state of the Mute. */ mute?: | "MUTE_UNSPECIFIED" | "MUTED" | "UNMUTED" | "UNDEFINED"; } /** * Manually constructed resource name. If the custom module evaluates against * only the resource data, you can omit the `iam_policy_data` field. If it * evaluates only the `iam_policy_data` field, you can omit the resource data. */ export interface SimulatedResource { /** * Optional. A representation of the IAM policy. */ iamPolicyData?: Policy; /** * Optional. A representation of the Google Cloud resource. Should match the * Google Cloud resource JSON format. */ resourceData?: { [key: string]: any }; /** * Required. The type of the resource, for example, * `compute.googleapis.com/Disk`. */ resourceType?: string; } function serializeSimulatedResource(data: any): SimulatedResource { return { ...data, iamPolicyData: data["iamPolicyData"] !== undefined ? serializePolicy(data["iamPolicyData"]) : undefined, }; } function deserializeSimulatedResource(data: any): SimulatedResource { return { ...data, iamPolicyData: data["iamPolicyData"] !== undefined ? deserializePolicy(data["iamPolicyData"]) : undefined, }; } /** * Possible test result. */ export interface SimulatedResult { /** * Error encountered during the test. */ error?: Status; /** * Finding that would be published for the test case, if a violation is * detected. */ finding?: Finding; /** * Indicates that the test case does not trigger any violation. */ noViolation?: Empty; } function serializeSimulatedResult(data: any): SimulatedResult { return { ...data, finding: data["finding"] !== undefined ? serializeFinding(data["finding"]) : undefined, }; } function deserializeSimulatedResult(data: any): SimulatedResult { return { ...data, finding: data["finding"] !== undefined ? deserializeFinding(data["finding"]) : undefined, }; } /** * Request message to simulate a CustomConfig against a given test resource. * Maximum size of the request is 4 MB by default. */ export interface SimulateSecurityHealthAnalyticsCustomModuleRequest { /** * Required. The custom configuration that you need to test. */ customConfig?: GoogleCloudSecuritycenterV1CustomConfig; /** * Required. Resource data to simulate custom module against. */ resource?: SimulatedResource; } function serializeSimulateSecurityHealthAnalyticsCustomModuleRequest(data: any): SimulateSecurityHealthAnalyticsCustomModuleRequest { return { ...data, resource: data["resource"] !== undefined ? serializeSimulatedResource(data["resource"]) : undefined, }; } function deserializeSimulateSecurityHealthAnalyticsCustomModuleRequest(data: any): SimulateSecurityHealthAnalyticsCustomModuleRequest { return { ...data, resource: data["resource"] !== undefined ? deserializeSimulatedResource(data["resource"]) : undefined, }; } /** * Response message for simulating a `SecurityHealthAnalyticsCustomModule` * against a given resource. */ export interface SimulateSecurityHealthAnalyticsCustomModuleResponse { /** * Result for test case in the corresponding request. */ result?: SimulatedResult; } function serializeSimulateSecurityHealthAnalyticsCustomModuleResponse(data: any): SimulateSecurityHealthAnalyticsCustomModuleResponse { return { ...data, result: data["result"] !== undefined ? serializeSimulatedResult(data["result"]) : undefined, }; } function deserializeSimulateSecurityHealthAnalyticsCustomModuleResponse(data: any): SimulateSecurityHealthAnalyticsCustomModuleResponse { return { ...data, result: data["result"] !== undefined ? deserializeSimulatedResult(data["result"]) : undefined, }; } /** * Attack path simulation */ export interface Simulation { /** * Indicates which cloud provider was used in this simulation. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * Output only. Time simulation was created */ readonly createTime?: Date; /** * Full resource name of the Simulation: `organizations/123/simulations/456` */ name?: string; /** * Resource value configurations' metadata used in this simulation. Maximum * of 100. */ resourceValueConfigsMetadata?: ResourceValueConfigMetadata[]; } /** * Security Command Center finding source. A finding source is an entity or a * mechanism that can produce a finding. A source is like a container of * findings that come from the same scanner, logger, monitor, and other tools. */ export interface Source { /** * The canonical name of the finding source. It's either * "organizations/{organization_id}/sources/{source_id}", * "folders/{folder_id}/sources/{source_id}", or * "projects/{project_number}/sources/{source_id}", depending on the closest * CRM ancestor of the resource associated with the finding. */ canonicalName?: string; /** * The description of the source (max of 1024 characters). Example: "Web * Security Scanner is a web security scanner for common vulnerabilities in * App Engine applications. It can automatically scan and detect four common * vulnerabilities, including cross-site-scripting (XSS), Flash injection, * mixed content (HTTP in HTTPS), and outdated or insecure libraries." */ description?: string; /** * The source's display name. A source's display name must be unique amongst * its siblings, for example, two sources with the same parent can't share the * same display name. The display name must have a length between 1 and 64 * characters (inclusive). */ displayName?: string; /** * The relative resource name of this source. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: "organizations/{organization_id}/sources/{source_id}" */ name?: string; } /** * Information about the static mute state. A static mute state overrides any * dynamic mute rules that apply to this finding. The static mute state can be * set by a static mute rule or by muting the finding directly. */ export interface StaticMute { /** * When the static mute was applied. */ applyTime?: Date; /** * The static mute state. If the value is `MUTED` or `UNMUTED`, then the * finding's overall mute state will have the same value. */ state?: | "MUTE_UNSPECIFIED" | "MUTED" | "UNMUTED" | "UNDEFINED"; } function serializeStaticMute(data: any): StaticMute { return { ...data, applyTime: data["applyTime"] !== undefined ? data["applyTime"].toISOString() : undefined, }; } function deserializeStaticMute(data: any): StaticMute { return { ...data, applyTime: data["applyTime"] !== undefined ? new Date(data["applyTime"]) : undefined, }; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * The config for streaming-based notifications, which send each event as soon * as it is detected. */ export interface StreamingConfig { /** * Expression that defines the filter to apply across create/update events of * assets or findings as specified by the event type. The expression is a list * of zero or more restrictions combined via logical operators `AND` and `OR`. * Parentheses are supported, and `OR` has higher precedence than `AND`. * Restrictions have the form ` ` and may have a `-` character in front of * them to indicate negation. The fields map to those defined in the * corresponding resource. The supported operators are: * `=` for all value * types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring * matching, for strings. The supported value types are: * string literals in * quotes. * integer literals without quotes. * boolean literals `true` and * `false` without quotes. */ filter?: string; } /** * Represents a Kubernetes subject. */ export interface Subject { /** * Authentication type for the subject. */ kind?: | "AUTH_TYPE_UNSPECIFIED" | "USER" | "SERVICEACCOUNT" | "GROUP"; /** * Name for the subject. */ name?: string; /** * Namespace for the subject. */ ns?: string; } /** * Request message for `TestIamPermissions` method. */ export interface TestIamPermissionsRequest { /** * 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). */ permissions?: string[]; } /** * Response message for `TestIamPermissions` method. */ export interface TestIamPermissionsResponse { /** * A subset of `TestPermissionsRequest.permissions` that the caller is * allowed. */ permissions?: string[]; } /** * Information about the ticket, if any, that is being used to track the * resolution of the issue that is identified by this finding. */ export interface TicketInfo { /** * The assignee of the ticket in the ticket system. */ assignee?: string; /** * The description of the ticket in the ticket system. */ description?: string; /** * The identifier of the ticket in the ticket system. */ id?: string; /** * The latest status of the ticket, as reported by the ticket system. */ status?: string; /** * The time when the ticket was last updated, as reported by the ticket * system. */ updateTime?: Date; /** * The link to the ticket in the ticket system. */ uri?: string; } function serializeTicketInfo(data: any): TicketInfo { return { ...data, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeTicketInfo(data: any): TicketInfo { return { ...data, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Contains details about a group of security issues that, when the issues * occur together, represent a greater risk than when the issues occur * independently. A group of such issues is referred to as a toxic combination. */ export interface ToxicCombination { /** * The [Attack exposure * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) * of this toxic combination. The score is a measure of how much this toxic * combination exposes one or more high-value resources to potential attack. */ attackExposureScore?: number; /** * List of resource names of findings associated with this toxic combination. * For example, `organizations/123/sources/456/findings/789`. */ relatedFindings?: string[]; } /** * Request to validate an Event Threat Detection custom module. */ export interface ValidateEventThreatDetectionCustomModuleRequest { /** * Required. The raw text of the module's contents. Used to generate error * messages. */ rawText?: string; /** * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). */ type?: string; } /** * Response to validating an Event Threat Detection custom module. */ export interface ValidateEventThreatDetectionCustomModuleResponse { /** * A list of errors returned by the validator. If the list is empty, there * were no errors. */ errors?: CustomModuleValidationErrors; } /** * A resource that is determined to have value to a user's system */ export interface ValuedResource { /** * Human-readable name of the valued resource. */ displayName?: string; /** * Exposed score for this valued resource. A value of 0 means no exposure was * detected exposure. */ exposedScore?: number; /** * Valued resource name, for example, e.g.: * `organizations/123/simulations/456/valuedResources/789` */ name?: string; /** * The [full resource * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) * of the valued resource. */ resource?: string; /** * The [resource * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) * of the valued resource. */ resourceType?: string; /** * How valuable this resource is. */ resourceValue?: | "RESOURCE_VALUE_UNSPECIFIED" | "RESOURCE_VALUE_LOW" | "RESOURCE_VALUE_MEDIUM" | "RESOURCE_VALUE_HIGH"; /** * List of resource value configurations' metadata used to determine the * value of this resource. Maximum of 100. */ resourceValueConfigsUsed?: ResourceValueConfigMetadata[]; } /** * Refers to common vulnerability fields e.g. cve, cvss, cwe etc. */ export interface Vulnerability { /** * CVE stands for Common Vulnerabilities and Exposures * (https://cve.mitre.org/about/) */ cve?: Cve; /** * The fixed package is relevant to the finding. */ fixedPackage?: Package; /** * The offending package is relevant to the finding. */ offendingPackage?: Package; /** * The security bulletin is relevant to this finding. */ securityBulletin?: SecurityBulletin; } function serializeVulnerability(data: any): Vulnerability { return { ...data, cve: data["cve"] !== undefined ? serializeCve(data["cve"]) : undefined, securityBulletin: data["securityBulletin"] !== undefined ? serializeSecurityBulletin(data["securityBulletin"]) : undefined, }; } function deserializeVulnerability(data: any): Vulnerability { return { ...data, cve: data["cve"] !== undefined ? deserializeCve(data["cve"]) : undefined, securityBulletin: data["securityBulletin"] !== undefined ? deserializeSecurityBulletin(data["securityBulletin"]) : undefined, }; } /** * Vulnerability count by severity. */ export interface VulnerabilityCountBySeverity { /** * Key is the Severity enum. */ severityToFindingCount?: { [key: string]: bigint }; } function serializeVulnerabilityCountBySeverity(data: any): VulnerabilityCountBySeverity { return { ...data, severityToFindingCount: data["severityToFindingCount"] !== undefined ? Object.fromEntries(Object.entries(data["severityToFindingCount"]).map(([k, v]: [string, any]) => ([k, String(v)]))) : undefined, }; } function deserializeVulnerabilityCountBySeverity(data: any): VulnerabilityCountBySeverity { return { ...data, severityToFindingCount: data["severityToFindingCount"] !== undefined ? Object.fromEntries(Object.entries(data["severityToFindingCount"]).map(([k, v]: [string, any]) => ([k, BigInt(v)]))) : undefined, }; } /** * Result containing the properties and count of a VulnerabilitySnapshot * request. */ export interface VulnerabilitySnapshot { /** * The cloud provider for the vulnerability snapshot. */ cloudProvider?: | "CLOUD_PROVIDER_UNSPECIFIED" | "GOOGLE_CLOUD_PLATFORM" | "AMAZON_WEB_SERVICES" | "MICROSOFT_AZURE"; /** * The vulnerability count by severity. */ findingCount?: VulnerabilityCountBySeverity; /** * Identifier. The vulnerability snapshot name. Format: * //locations//vulnerabilitySnapshots/ */ name?: string; /** * The time that the snapshot was taken. */ snapshotTime?: Date; } function serializeVulnerabilitySnapshot(data: any): VulnerabilitySnapshot { return { ...data, findingCount: data["findingCount"] !== undefined ? serializeVulnerabilityCountBySeverity(data["findingCount"]) : undefined, snapshotTime: data["snapshotTime"] !== undefined ? data["snapshotTime"].toISOString() : undefined, }; } function deserializeVulnerabilitySnapshot(data: any): VulnerabilitySnapshot { return { ...data, findingCount: data["findingCount"] !== undefined ? deserializeVulnerabilityCountBySeverity(data["findingCount"]) : undefined, snapshotTime: data["snapshotTime"] !== undefined ? new Date(data["snapshotTime"]) : undefined, }; } /** * A signature corresponding to a YARA rule. */ export interface YaraRuleSignature { /** * The name of the YARA rule. */ yaraRule?: string; } function decodeBase64(b64: string): Uint8Array { const binString = atob(b64); const size = binString.length; const bytes = new Uint8Array(size); for (let i = 0; i < size; i++) { bytes[i] = binString.charCodeAt(i); } return bytes; } const base64abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]; /** * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation * @param data */ function encodeBase64(uint8: Uint8Array): string { let result = "", i; const l = uint8.length; for (i = 2; i < l; i += 3) { result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; result += base64abc[uint8[i] & 0x3f]; } if (i === l + 1) { // 1 octet yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[(uint8[i - 2] & 0x03) << 4]; result += "=="; } if (i === l) { // 2 octets yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[(uint8[i - 1] & 0x0f) << 2]; result += "="; } return result; }