@googleapis/securitycenter 13.0.1 → 14.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta1.ts CHANGED
@@ -224,6 +224,39 @@ export namespace securitycenter_v1beta1 {
224
224
  */
225
225
  count?: string | null;
226
226
  }
227
+ /**
228
+ * Contains information about the AI model associated with the finding.
229
+ */
230
+ export interface Schema$AiModel {
231
+ /**
232
+ * The platform on which the model is deployed.
233
+ */
234
+ deploymentPlatform?: string | null;
235
+ /**
236
+ * The user defined display name of model. Ex. baseline-classification-model
237
+ */
238
+ displayName?: string | null;
239
+ /**
240
+ * The domain of the model, for example, “image-classification”.
241
+ */
242
+ domain?: string | null;
243
+ /**
244
+ * The name of the model library, for example, “transformers”.
245
+ */
246
+ library?: string | null;
247
+ /**
248
+ * The region in which the model is used, for example, “us-central1”.
249
+ */
250
+ location?: string | null;
251
+ /**
252
+ * The name of the AI model, for example, "gemini:1.0.0".
253
+ */
254
+ name?: string | null;
255
+ /**
256
+ * The publisher of the model, for example, “google” or “nvidia”.
257
+ */
258
+ publisher?: string | null;
259
+ }
227
260
  /**
228
261
  * Allowed IP rule.
229
262
  */
@@ -542,6 +575,15 @@ export namespace securitycenter_v1beta1 {
542
575
  */
543
576
  storagePool?: string | null;
544
577
  }
578
+ /**
579
+ * The destination big query dataset to export findings to.
580
+ */
581
+ export interface Schema$BigQueryDestination {
582
+ /**
583
+ * Required. The relative resource name of the destination dataset, in the form projects/{projectId\}/datasets/{datasetId\}.
584
+ */
585
+ dataset?: string | null;
586
+ }
545
587
  /**
546
588
  * Associates `members`, or principals, with a `role`.
547
589
  */
@@ -936,6 +978,23 @@ export namespace securitycenter_v1beta1 {
936
978
  */
937
979
  maxRetentionAllowed?: string | null;
938
980
  }
981
+ /**
982
+ * Vertex AI dataset associated with the finding.
983
+ */
984
+ export interface Schema$Dataset {
985
+ /**
986
+ * The user defined display name of dataset, e.g. plants-dataset
987
+ */
988
+ displayName?: string | null;
989
+ /**
990
+ * Resource name of the dataset, e.g. projects/{project\}/locations/{location\}/datasets/2094040236064505856
991
+ */
992
+ name?: string | null;
993
+ /**
994
+ * Data source, such as BigQuery source URI, e.g. bq://scc-nexus-test.AIPPtest.gsod
995
+ */
996
+ source?: string | null;
997
+ }
939
998
  /**
940
999
  * Denied IP rule.
941
1000
  */
@@ -1040,6 +1099,23 @@ export namespace securitycenter_v1beta1 {
1040
1099
  */
1041
1100
  totalExfiltratedBytes?: string | null;
1042
1101
  }
1102
+ /**
1103
+ * The LRO metadata for a ExportFindings request.
1104
+ */
1105
+ export interface Schema$ExportFindingsMetadata {
1106
+ /**
1107
+ * Required. The destination big query dataset to export findings to.
1108
+ */
1109
+ bigQueryDestination?: Schema$BigQueryDestination;
1110
+ /**
1111
+ * Optional. Timestamp at which export was started
1112
+ */
1113
+ exportStartTime?: string | null;
1114
+ }
1115
+ /**
1116
+ * The response to a ExportFindings request. Contains the LRO information.
1117
+ */
1118
+ export interface Schema$ExportFindingsResponse {}
1043
1119
  /**
1044
1120
  * 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.
1045
1121
  */
@@ -1077,6 +1153,10 @@ export namespace securitycenter_v1beta1 {
1077
1153
  * The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
1078
1154
  */
1079
1155
  hashedSize?: string | null;
1156
+ /**
1157
+ * Operation(s) performed on a file.
1158
+ */
1159
+ operations?: Schema$FileOperation[];
1080
1160
  /**
1081
1161
  * True when the hash covers only a prefix of the file.
1082
1162
  */
@@ -1094,6 +1174,15 @@ export namespace securitycenter_v1beta1 {
1094
1174
  */
1095
1175
  size?: string | null;
1096
1176
  }
1177
+ /**
1178
+ * Operation(s) performed on a file.
1179
+ */
1180
+ export interface Schema$FileOperation {
1181
+ /**
1182
+ * The type of the operation
1183
+ */
1184
+ type?: string | null;
1185
+ }
1097
1186
  /**
1098
1187
  * 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.
1099
1188
  */
@@ -1106,6 +1195,10 @@ export namespace securitycenter_v1beta1 {
1106
1195
  * AffectedResources associated with the finding.
1107
1196
  */
1108
1197
  affectedResources?: Schema$AffectedResources;
1198
+ /**
1199
+ * The AI model associated with the finding.
1200
+ */
1201
+ aiModel?: Schema$AiModel;
1109
1202
  /**
1110
1203
  * Represents an application associated with the finding.
1111
1204
  */
@@ -1332,6 +1425,10 @@ export namespace securitycenter_v1beta1 {
1332
1425
  * 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.
1333
1426
  */
1334
1427
  toxicCombination?: Schema$ToxicCombination;
1428
+ /**
1429
+ * VertexAi associated with the finding.
1430
+ */
1431
+ vertexAi?: Schema$VertexAi;
1335
1432
  /**
1336
1433
  * Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
1337
1434
  */
@@ -1351,7 +1448,7 @@ export namespace securitycenter_v1beta1 {
1351
1448
  resourceFolderDisplayName?: string | null;
1352
1449
  }
1353
1450
  /**
1354
- * GCP metadata associated with the resource, only applicable if the finding's cloud provider is Google Cloud Platform.
1451
+ * Google Cloud metadata associated with the resource. Only applicable if the finding's cloud provider is Google Cloud.
1355
1452
  */
1356
1453
  export interface Schema$GcpMetadata {
1357
1454
  /**
@@ -2154,6 +2251,39 @@ export namespace securitycenter_v1beta1 {
2154
2251
  */
2155
2252
  count?: string | null;
2156
2253
  }
2254
+ /**
2255
+ * Contains information about the AI model associated with the finding.
2256
+ */
2257
+ export interface Schema$GoogleCloudSecuritycenterV2AiModel {
2258
+ /**
2259
+ * The platform on which the model is deployed.
2260
+ */
2261
+ deploymentPlatform?: string | null;
2262
+ /**
2263
+ * The user defined display name of model. Ex. baseline-classification-model
2264
+ */
2265
+ displayName?: string | null;
2266
+ /**
2267
+ * The domain of the model, for example, “image-classification”.
2268
+ */
2269
+ domain?: string | null;
2270
+ /**
2271
+ * The name of the model library, for example, “transformers”.
2272
+ */
2273
+ library?: string | null;
2274
+ /**
2275
+ * The region in which the model is used, for example, “us-central1”.
2276
+ */
2277
+ location?: string | null;
2278
+ /**
2279
+ * The name of the AI model, for example, "gemini:1.0.0".
2280
+ */
2281
+ name?: string | null;
2282
+ /**
2283
+ * The publisher of the model, for example, “google” or “nvidia”.
2284
+ */
2285
+ publisher?: string | null;
2286
+ }
2157
2287
  /**
2158
2288
  * Allowed IP rule.
2159
2289
  */
@@ -2839,6 +2969,23 @@ export namespace securitycenter_v1beta1 {
2839
2969
  */
2840
2970
  maxRetentionAllowed?: string | null;
2841
2971
  }
2972
+ /**
2973
+ * Vertex AI dataset associated with the finding.
2974
+ */
2975
+ export interface Schema$GoogleCloudSecuritycenterV2Dataset {
2976
+ /**
2977
+ * The user defined display name of dataset, e.g. plants-dataset
2978
+ */
2979
+ displayName?: string | null;
2980
+ /**
2981
+ * Resource name of the dataset, e.g. projects/{project\}/locations/{location\}/datasets/2094040236064505856
2982
+ */
2983
+ name?: string | null;
2984
+ /**
2985
+ * Data source, such as a BigQuery source URI, e.g. bq://scc-nexus-test.AIPPtest.gsod
2986
+ */
2987
+ source?: string | null;
2988
+ }
2842
2989
  /**
2843
2990
  * Denied IP rule.
2844
2991
  */
@@ -3004,6 +3151,10 @@ export namespace securitycenter_v1beta1 {
3004
3151
  * The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
3005
3152
  */
3006
3153
  hashedSize?: string | null;
3154
+ /**
3155
+ * Operation(s) performed on a file.
3156
+ */
3157
+ operations?: Schema$GoogleCloudSecuritycenterV2FileOperation[];
3007
3158
  /**
3008
3159
  * True when the hash covers only a prefix of the file.
3009
3160
  */
@@ -3021,6 +3172,15 @@ export namespace securitycenter_v1beta1 {
3021
3172
  */
3022
3173
  size?: string | null;
3023
3174
  }
3175
+ /**
3176
+ * Operation(s) performed on a file.
3177
+ */
3178
+ export interface Schema$GoogleCloudSecuritycenterV2FileOperation {
3179
+ /**
3180
+ * The type of the operation
3181
+ */
3182
+ type?: string | null;
3183
+ }
3024
3184
  /**
3025
3185
  * 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.
3026
3186
  */
@@ -3033,6 +3193,10 @@ export namespace securitycenter_v1beta1 {
3033
3193
  * AffectedResources associated with the finding.
3034
3194
  */
3035
3195
  affectedResources?: Schema$GoogleCloudSecuritycenterV2AffectedResources;
3196
+ /**
3197
+ * The AI model associated with the finding.
3198
+ */
3199
+ aiModel?: Schema$GoogleCloudSecuritycenterV2AiModel;
3036
3200
  /**
3037
3201
  * Represents an application associated with the finding.
3038
3202
  */
@@ -3202,7 +3366,7 @@ export namespace securitycenter_v1beta1 {
3202
3366
  */
3203
3367
  muteUpdateTime?: string | null;
3204
3368
  /**
3205
- * 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\}`
3369
+ * Identifier. 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\}`
3206
3370
  */
3207
3371
  name?: string | null;
3208
3372
  /**
@@ -3261,6 +3425,10 @@ export namespace securitycenter_v1beta1 {
3261
3425
  * 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.
3262
3426
  */
3263
3427
  toxicCombination?: Schema$GoogleCloudSecuritycenterV2ToxicCombination;
3428
+ /**
3429
+ * VertexAi associated with the finding.
3430
+ */
3431
+ vertexAi?: Schema$GoogleCloudSecuritycenterV2VertexAi;
3264
3432
  /**
3265
3433
  * Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
3266
3434
  */
@@ -3982,6 +4150,19 @@ export namespace securitycenter_v1beta1 {
3982
4150
  */
3983
4151
  packageVersion?: string | null;
3984
4152
  }
4153
+ /**
4154
+ * Vertex AI training pipeline associated with the finding.
4155
+ */
4156
+ export interface Schema$GoogleCloudSecuritycenterV2Pipeline {
4157
+ /**
4158
+ * The user-defined display name of pipeline, e.g. plants-classification
4159
+ */
4160
+ displayName?: string | null;
4161
+ /**
4162
+ * Resource name of the pipeline, e.g. projects/{project\}/locations/{location\}/trainingPipelines/5253428229225578496
4163
+ */
4164
+ name?: string | null;
4165
+ }
3985
4166
  /**
3986
4167
  * A Kubernetes Pod.
3987
4168
  */
@@ -4077,6 +4258,10 @@ export namespace securitycenter_v1beta1 {
4077
4258
  * 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.
4078
4259
  */
4079
4260
  script?: Schema$GoogleCloudSecuritycenterV2File;
4261
+ /**
4262
+ * The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
4263
+ */
4264
+ userId?: string | null;
4080
4265
  }
4081
4266
  /**
4082
4267
  * Indicates what signature matched this process.
@@ -4456,6 +4641,19 @@ export namespace securitycenter_v1beta1 {
4456
4641
  */
4457
4642
  relatedFindings?: string[] | null;
4458
4643
  }
4644
+ /**
4645
+ * Vertex AI-related information associated with the finding.
4646
+ */
4647
+ export interface Schema$GoogleCloudSecuritycenterV2VertexAi {
4648
+ /**
4649
+ * Datasets associated with the finding.
4650
+ */
4651
+ datasets?: Schema$GoogleCloudSecuritycenterV2Dataset[];
4652
+ /**
4653
+ * Pipelines associated with the finding.
4654
+ */
4655
+ pipelines?: Schema$GoogleCloudSecuritycenterV2Pipeline[];
4656
+ }
4459
4657
  /**
4460
4658
  * Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
4461
4659
  */
@@ -5099,6 +5297,19 @@ export namespace securitycenter_v1beta1 {
5099
5297
  */
5100
5298
  packageVersion?: string | null;
5101
5299
  }
5300
+ /**
5301
+ * Vertex AI training pipeline associated with the finding.
5302
+ */
5303
+ export interface Schema$Pipeline {
5304
+ /**
5305
+ * The user defined display name of pipeline, e.g. plants-classification
5306
+ */
5307
+ displayName?: string | null;
5308
+ /**
5309
+ * Resource name of the pipeline, e.g. projects/{project\}/locations/{location\}/trainingPipelines/5253428229225578496
5310
+ */
5311
+ name?: string | null;
5312
+ }
5102
5313
  /**
5103
5314
  * A Kubernetes Pod.
5104
5315
  */
@@ -5215,6 +5426,10 @@ export namespace securitycenter_v1beta1 {
5215
5426
  * 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.
5216
5427
  */
5217
5428
  script?: Schema$File;
5429
+ /**
5430
+ * The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
5431
+ */
5432
+ userId?: string | null;
5218
5433
  }
5219
5434
  /**
5220
5435
  * Indicates what signature matched this process.
@@ -5590,6 +5805,19 @@ export namespace securitycenter_v1beta1 {
5590
5805
  */
5591
5806
  relatedFindings?: string[] | null;
5592
5807
  }
5808
+ /**
5809
+ * Vertex AI-related information associated with the finding.
5810
+ */
5811
+ export interface Schema$VertexAi {
5812
+ /**
5813
+ * Datasets associated with the finding.
5814
+ */
5815
+ datasets?: Schema$Dataset[];
5816
+ /**
5817
+ * Pipelines associated with the finding.
5818
+ */
5819
+ pipelines?: Schema$Pipeline[];
5820
+ }
5593
5821
  /**
5594
5822
  * Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
5595
5823
  */
@@ -5677,6 +5905,54 @@ export namespace securitycenter_v1beta1 {
5677
5905
 
5678
5906
  /**
5679
5907
  * Gets the settings for an organization.
5908
+ * @example
5909
+ * ```js
5910
+ * // Before running the sample:
5911
+ * // - Enable the API at:
5912
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
5913
+ * // - Login into gcloud by running:
5914
+ * // ```sh
5915
+ * // $ gcloud auth application-default login
5916
+ * // ```
5917
+ * // - Install the npm module by running:
5918
+ * // ```sh
5919
+ * // $ npm install googleapis
5920
+ * // ```
5921
+ *
5922
+ * const {google} = require('googleapis');
5923
+ * const securitycenter = google.securitycenter('v1beta1');
5924
+ *
5925
+ * async function main() {
5926
+ * const auth = new google.auth.GoogleAuth({
5927
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5928
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5929
+ * });
5930
+ *
5931
+ * // Acquire an auth client, and bind it to all future calls
5932
+ * const authClient = await auth.getClient();
5933
+ * google.options({auth: authClient});
5934
+ *
5935
+ * // Do the magic
5936
+ * const res = await securitycenter.organizations.getOrganizationSettings({
5937
+ * // Required. Name of the organization to get organization settings for. Its format is "organizations/[organization_id]/organizationSettings".
5938
+ * name: 'organizations/my-organization/organizationSettings',
5939
+ * });
5940
+ * console.log(res.data);
5941
+ *
5942
+ * // Example response
5943
+ * // {
5944
+ * // "assetDiscoveryConfig": {},
5945
+ * // "enableAssetDiscovery": false,
5946
+ * // "name": "my_name"
5947
+ * // }
5948
+ * }
5949
+ *
5950
+ * main().catch(e => {
5951
+ * console.error(e);
5952
+ * throw e;
5953
+ * });
5954
+ *
5955
+ * ```
5680
5956
  *
5681
5957
  * @param params - Parameters for request
5682
5958
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5770,6 +6046,66 @@ export namespace securitycenter_v1beta1 {
5770
6046
 
5771
6047
  /**
5772
6048
  * Updates an organization's settings.
6049
+ * @example
6050
+ * ```js
6051
+ * // Before running the sample:
6052
+ * // - Enable the API at:
6053
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6054
+ * // - Login into gcloud by running:
6055
+ * // ```sh
6056
+ * // $ gcloud auth application-default login
6057
+ * // ```
6058
+ * // - Install the npm module by running:
6059
+ * // ```sh
6060
+ * // $ npm install googleapis
6061
+ * // ```
6062
+ *
6063
+ * const {google} = require('googleapis');
6064
+ * const securitycenter = google.securitycenter('v1beta1');
6065
+ *
6066
+ * async function main() {
6067
+ * const auth = new google.auth.GoogleAuth({
6068
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6069
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6070
+ * });
6071
+ *
6072
+ * // Acquire an auth client, and bind it to all future calls
6073
+ * const authClient = await auth.getClient();
6074
+ * google.options({auth: authClient});
6075
+ *
6076
+ * // Do the magic
6077
+ * const res = await securitycenter.organizations.updateOrganizationSettings({
6078
+ * // The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/organizationSettings".
6079
+ * name: 'organizations/my-organization/organizationSettings',
6080
+ * // The FieldMask to use when updating the settings resource.
6081
+ * updateMask: 'placeholder-value',
6082
+ *
6083
+ * // Request body metadata
6084
+ * requestBody: {
6085
+ * // request body parameters
6086
+ * // {
6087
+ * // "assetDiscoveryConfig": {},
6088
+ * // "enableAssetDiscovery": false,
6089
+ * // "name": "my_name"
6090
+ * // }
6091
+ * },
6092
+ * });
6093
+ * console.log(res.data);
6094
+ *
6095
+ * // Example response
6096
+ * // {
6097
+ * // "assetDiscoveryConfig": {},
6098
+ * // "enableAssetDiscovery": false,
6099
+ * // "name": "my_name"
6100
+ * // }
6101
+ * }
6102
+ *
6103
+ * main().catch(e => {
6104
+ * console.error(e);
6105
+ * throw e;
6106
+ * });
6107
+ *
6108
+ * ```
5773
6109
  *
5774
6110
  * @param params - Parameters for request
5775
6111
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5894,6 +6230,67 @@ export namespace securitycenter_v1beta1 {
5894
6230
 
5895
6231
  /**
5896
6232
  * Filters an organization's assets and groups them by their specified properties.
6233
+ * @example
6234
+ * ```js
6235
+ * // Before running the sample:
6236
+ * // - Enable the API at:
6237
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6238
+ * // - Login into gcloud by running:
6239
+ * // ```sh
6240
+ * // $ gcloud auth application-default login
6241
+ * // ```
6242
+ * // - Install the npm module by running:
6243
+ * // ```sh
6244
+ * // $ npm install googleapis
6245
+ * // ```
6246
+ *
6247
+ * const {google} = require('googleapis');
6248
+ * const securitycenter = google.securitycenter('v1beta1');
6249
+ *
6250
+ * async function main() {
6251
+ * const auth = new google.auth.GoogleAuth({
6252
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6253
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6254
+ * });
6255
+ *
6256
+ * // Acquire an auth client, and bind it to all future calls
6257
+ * const authClient = await auth.getClient();
6258
+ * google.options({auth: authClient});
6259
+ *
6260
+ * // Do the magic
6261
+ * const res = await securitycenter.organizations.assets.group({
6262
+ * // Required. Name of the organization to groupBy. Its format is "organizations/[organization_id]".
6263
+ * parent: 'organizations/my-organization',
6264
+ *
6265
+ * // Request body metadata
6266
+ * requestBody: {
6267
+ * // request body parameters
6268
+ * // {
6269
+ * // "compareDuration": "my_compareDuration",
6270
+ * // "filter": "my_filter",
6271
+ * // "groupBy": "my_groupBy",
6272
+ * // "pageSize": 0,
6273
+ * // "pageToken": "my_pageToken",
6274
+ * // "readTime": "my_readTime"
6275
+ * // }
6276
+ * },
6277
+ * });
6278
+ * console.log(res.data);
6279
+ *
6280
+ * // Example response
6281
+ * // {
6282
+ * // "groupByResults": [],
6283
+ * // "nextPageToken": "my_nextPageToken",
6284
+ * // "readTime": "my_readTime"
6285
+ * // }
6286
+ * }
6287
+ *
6288
+ * main().catch(e => {
6289
+ * console.error(e);
6290
+ * throw e;
6291
+ * });
6292
+ *
6293
+ * ```
5897
6294
  *
5898
6295
  * @param params - Parameters for request
5899
6296
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5986,6 +6383,69 @@ export namespace securitycenter_v1beta1 {
5986
6383
 
5987
6384
  /**
5988
6385
  * Lists an organization's assets.
6386
+ * @example
6387
+ * ```js
6388
+ * // Before running the sample:
6389
+ * // - Enable the API at:
6390
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6391
+ * // - Login into gcloud by running:
6392
+ * // ```sh
6393
+ * // $ gcloud auth application-default login
6394
+ * // ```
6395
+ * // - Install the npm module by running:
6396
+ * // ```sh
6397
+ * // $ npm install googleapis
6398
+ * // ```
6399
+ *
6400
+ * const {google} = require('googleapis');
6401
+ * const securitycenter = google.securitycenter('v1beta1');
6402
+ *
6403
+ * async function main() {
6404
+ * const auth = new google.auth.GoogleAuth({
6405
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6406
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6407
+ * });
6408
+ *
6409
+ * // Acquire an auth client, and bind it to all future calls
6410
+ * const authClient = await auth.getClient();
6411
+ * google.options({auth: authClient});
6412
+ *
6413
+ * // Do the magic
6414
+ * const res = await securitycenter.organizations.assets.list({
6415
+ * // When compare_duration is set, the ListAssetResult's "state" 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 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" values when compare_duration is specified: * "ADDED": indicates that the asset was not present before 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 is "UNUSED", which indicates that the asset is present at read_time.
6416
+ * compareDuration: 'placeholder-value',
6417
+ * // Optional. A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.
6418
+ * fieldMask: 'placeholder-value',
6419
+ * // 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 not 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. For example, `resource_properties.size = 100` is a valid filter string.
6420
+ * filter: 'placeholder-value',
6421
+ * // 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.
6422
+ * orderBy: 'placeholder-value',
6423
+ * // The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
6424
+ * pageSize: 'placeholder-value',
6425
+ * // 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.
6426
+ * pageToken: 'placeholder-value',
6427
+ * // Required. Name of the organization assets should belong to. Its format is "organizations/[organization_id]".
6428
+ * parent: 'organizations/my-organization',
6429
+ * // 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.
6430
+ * readTime: 'placeholder-value',
6431
+ * });
6432
+ * console.log(res.data);
6433
+ *
6434
+ * // Example response
6435
+ * // {
6436
+ * // "listAssetsResults": [],
6437
+ * // "nextPageToken": "my_nextPageToken",
6438
+ * // "readTime": "my_readTime",
6439
+ * // "totalSize": 0
6440
+ * // }
6441
+ * }
6442
+ *
6443
+ * main().catch(e => {
6444
+ * console.error(e);
6445
+ * throw e;
6446
+ * });
6447
+ *
6448
+ * ```
5989
6449
  *
5990
6450
  * @param params - Parameters for request
5991
6451
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6078,6 +6538,62 @@ export namespace securitycenter_v1beta1 {
6078
6538
 
6079
6539
  /**
6080
6540
  * 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.
6541
+ * @example
6542
+ * ```js
6543
+ * // Before running the sample:
6544
+ * // - Enable the API at:
6545
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6546
+ * // - Login into gcloud by running:
6547
+ * // ```sh
6548
+ * // $ gcloud auth application-default login
6549
+ * // ```
6550
+ * // - Install the npm module by running:
6551
+ * // ```sh
6552
+ * // $ npm install googleapis
6553
+ * // ```
6554
+ *
6555
+ * const {google} = require('googleapis');
6556
+ * const securitycenter = google.securitycenter('v1beta1');
6557
+ *
6558
+ * async function main() {
6559
+ * const auth = new google.auth.GoogleAuth({
6560
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6561
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6562
+ * });
6563
+ *
6564
+ * // Acquire an auth client, and bind it to all future calls
6565
+ * const authClient = await auth.getClient();
6566
+ * google.options({auth: authClient});
6567
+ *
6568
+ * // Do the magic
6569
+ * const res = await securitycenter.organizations.assets.runDiscovery({
6570
+ * // Required. Name of the organization to run asset discovery for. Its format is "organizations/[organization_id]".
6571
+ * parent: 'organizations/my-organization',
6572
+ *
6573
+ * // Request body metadata
6574
+ * requestBody: {
6575
+ * // request body parameters
6576
+ * // {}
6577
+ * },
6578
+ * });
6579
+ * console.log(res.data);
6580
+ *
6581
+ * // Example response
6582
+ * // {
6583
+ * // "done": false,
6584
+ * // "error": {},
6585
+ * // "metadata": {},
6586
+ * // "name": "my_name",
6587
+ * // "response": {}
6588
+ * // }
6589
+ * }
6590
+ *
6591
+ * main().catch(e => {
6592
+ * console.error(e);
6593
+ * throw e;
6594
+ * });
6595
+ *
6596
+ * ```
6081
6597
  *
6082
6598
  * @param params - Parameters for request
6083
6599
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6170,6 +6686,66 @@ export namespace securitycenter_v1beta1 {
6170
6686
 
6171
6687
  /**
6172
6688
  * Updates security marks.
6689
+ * @example
6690
+ * ```js
6691
+ * // Before running the sample:
6692
+ * // - Enable the API at:
6693
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6694
+ * // - Login into gcloud by running:
6695
+ * // ```sh
6696
+ * // $ gcloud auth application-default login
6697
+ * // ```
6698
+ * // - Install the npm module by running:
6699
+ * // ```sh
6700
+ * // $ npm install googleapis
6701
+ * // ```
6702
+ *
6703
+ * const {google} = require('googleapis');
6704
+ * const securitycenter = google.securitycenter('v1beta1');
6705
+ *
6706
+ * async function main() {
6707
+ * const auth = new google.auth.GoogleAuth({
6708
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6709
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6710
+ * });
6711
+ *
6712
+ * // Acquire an auth client, and bind it to all future calls
6713
+ * const authClient = await auth.getClient();
6714
+ * google.options({auth: authClient});
6715
+ *
6716
+ * // Do the magic
6717
+ * const res = await securitycenter.organizations.assets.updateSecurityMarks({
6718
+ * // 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".
6719
+ * name: 'organizations/my-organization/assets/my-asset/securityMarks',
6720
+ * // The time at which the updated SecurityMarks take effect.
6721
+ * startTime: 'placeholder-value',
6722
+ * // The FieldMask to use when updating the security marks resource.
6723
+ * updateMask: 'placeholder-value',
6724
+ *
6725
+ * // Request body metadata
6726
+ * requestBody: {
6727
+ * // request body parameters
6728
+ * // {
6729
+ * // "marks": {},
6730
+ * // "name": "my_name"
6731
+ * // }
6732
+ * },
6733
+ * });
6734
+ * console.log(res.data);
6735
+ *
6736
+ * // Example response
6737
+ * // {
6738
+ * // "marks": {},
6739
+ * // "name": "my_name"
6740
+ * // }
6741
+ * }
6742
+ *
6743
+ * main().catch(e => {
6744
+ * console.error(e);
6745
+ * throw e;
6746
+ * });
6747
+ *
6748
+ * ```
6173
6749
  *
6174
6750
  * @param params - Parameters for request
6175
6751
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6356,6 +6932,56 @@ export namespace securitycenter_v1beta1 {
6356
6932
 
6357
6933
  /**
6358
6934
  * 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`.
6935
+ * @example
6936
+ * ```js
6937
+ * // Before running the sample:
6938
+ * // - Enable the API at:
6939
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6940
+ * // - Login into gcloud by running:
6941
+ * // ```sh
6942
+ * // $ gcloud auth application-default login
6943
+ * // ```
6944
+ * // - Install the npm module by running:
6945
+ * // ```sh
6946
+ * // $ npm install googleapis
6947
+ * // ```
6948
+ *
6949
+ * const {google} = require('googleapis');
6950
+ * const securitycenter = google.securitycenter('v1beta1');
6951
+ *
6952
+ * async function main() {
6953
+ * const auth = new google.auth.GoogleAuth({
6954
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6955
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6956
+ * });
6957
+ *
6958
+ * // Acquire an auth client, and bind it to all future calls
6959
+ * const authClient = await auth.getClient();
6960
+ * google.options({auth: authClient});
6961
+ *
6962
+ * // Do the magic
6963
+ * const res = await securitycenter.organizations.operations.cancel({
6964
+ * // The name of the operation resource to be cancelled.
6965
+ * name: 'organizations/my-organization/operations/my-operation',
6966
+ *
6967
+ * // Request body metadata
6968
+ * requestBody: {
6969
+ * // request body parameters
6970
+ * // {}
6971
+ * },
6972
+ * });
6973
+ * console.log(res.data);
6974
+ *
6975
+ * // Example response
6976
+ * // {}
6977
+ * }
6978
+ *
6979
+ * main().catch(e => {
6980
+ * console.error(e);
6981
+ * throw e;
6982
+ * });
6983
+ *
6984
+ * ```
6359
6985
  *
6360
6986
  * @param params - Parameters for request
6361
6987
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6448,6 +7074,50 @@ export namespace securitycenter_v1beta1 {
6448
7074
 
6449
7075
  /**
6450
7076
  * 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`.
7077
+ * @example
7078
+ * ```js
7079
+ * // Before running the sample:
7080
+ * // - Enable the API at:
7081
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7082
+ * // - Login into gcloud by running:
7083
+ * // ```sh
7084
+ * // $ gcloud auth application-default login
7085
+ * // ```
7086
+ * // - Install the npm module by running:
7087
+ * // ```sh
7088
+ * // $ npm install googleapis
7089
+ * // ```
7090
+ *
7091
+ * const {google} = require('googleapis');
7092
+ * const securitycenter = google.securitycenter('v1beta1');
7093
+ *
7094
+ * async function main() {
7095
+ * const auth = new google.auth.GoogleAuth({
7096
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7097
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7098
+ * });
7099
+ *
7100
+ * // Acquire an auth client, and bind it to all future calls
7101
+ * const authClient = await auth.getClient();
7102
+ * google.options({auth: authClient});
7103
+ *
7104
+ * // Do the magic
7105
+ * const res = await securitycenter.organizations.operations.delete({
7106
+ * // The name of the operation resource to be deleted.
7107
+ * name: 'organizations/my-organization/operations/my-operation',
7108
+ * });
7109
+ * console.log(res.data);
7110
+ *
7111
+ * // Example response
7112
+ * // {}
7113
+ * }
7114
+ *
7115
+ * main().catch(e => {
7116
+ * console.error(e);
7117
+ * throw e;
7118
+ * });
7119
+ *
7120
+ * ```
6451
7121
  *
6452
7122
  * @param params - Parameters for request
6453
7123
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6537,6 +7207,56 @@ export namespace securitycenter_v1beta1 {
6537
7207
 
6538
7208
  /**
6539
7209
  * 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.
7210
+ * @example
7211
+ * ```js
7212
+ * // Before running the sample:
7213
+ * // - Enable the API at:
7214
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7215
+ * // - Login into gcloud by running:
7216
+ * // ```sh
7217
+ * // $ gcloud auth application-default login
7218
+ * // ```
7219
+ * // - Install the npm module by running:
7220
+ * // ```sh
7221
+ * // $ npm install googleapis
7222
+ * // ```
7223
+ *
7224
+ * const {google} = require('googleapis');
7225
+ * const securitycenter = google.securitycenter('v1beta1');
7226
+ *
7227
+ * async function main() {
7228
+ * const auth = new google.auth.GoogleAuth({
7229
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7230
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7231
+ * });
7232
+ *
7233
+ * // Acquire an auth client, and bind it to all future calls
7234
+ * const authClient = await auth.getClient();
7235
+ * google.options({auth: authClient});
7236
+ *
7237
+ * // Do the magic
7238
+ * const res = await securitycenter.organizations.operations.get({
7239
+ * // The name of the operation resource.
7240
+ * name: 'organizations/my-organization/operations/my-operation',
7241
+ * });
7242
+ * console.log(res.data);
7243
+ *
7244
+ * // Example response
7245
+ * // {
7246
+ * // "done": false,
7247
+ * // "error": {},
7248
+ * // "metadata": {},
7249
+ * // "name": "my_name",
7250
+ * // "response": {}
7251
+ * // }
7252
+ * }
7253
+ *
7254
+ * main().catch(e => {
7255
+ * console.error(e);
7256
+ * throw e;
7257
+ * });
7258
+ *
7259
+ * ```
6540
7260
  *
6541
7261
  * @param params - Parameters for request
6542
7262
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6626,6 +7346,59 @@ export namespace securitycenter_v1beta1 {
6626
7346
 
6627
7347
  /**
6628
7348
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
7349
+ * @example
7350
+ * ```js
7351
+ * // Before running the sample:
7352
+ * // - Enable the API at:
7353
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7354
+ * // - Login into gcloud by running:
7355
+ * // ```sh
7356
+ * // $ gcloud auth application-default login
7357
+ * // ```
7358
+ * // - Install the npm module by running:
7359
+ * // ```sh
7360
+ * // $ npm install googleapis
7361
+ * // ```
7362
+ *
7363
+ * const {google} = require('googleapis');
7364
+ * const securitycenter = google.securitycenter('v1beta1');
7365
+ *
7366
+ * async function main() {
7367
+ * const auth = new google.auth.GoogleAuth({
7368
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7369
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7370
+ * });
7371
+ *
7372
+ * // Acquire an auth client, and bind it to all future calls
7373
+ * const authClient = await auth.getClient();
7374
+ * google.options({auth: authClient});
7375
+ *
7376
+ * // Do the magic
7377
+ * const res = await securitycenter.organizations.operations.list({
7378
+ * // The standard list filter.
7379
+ * filter: 'placeholder-value',
7380
+ * // The name of the operation's parent resource.
7381
+ * name: 'organizations/my-organization/operations',
7382
+ * // The standard list page size.
7383
+ * pageSize: 'placeholder-value',
7384
+ * // The standard list page token.
7385
+ * pageToken: 'placeholder-value',
7386
+ * });
7387
+ * console.log(res.data);
7388
+ *
7389
+ * // Example response
7390
+ * // {
7391
+ * // "nextPageToken": "my_nextPageToken",
7392
+ * // "operations": []
7393
+ * // }
7394
+ * }
7395
+ *
7396
+ * main().catch(e => {
7397
+ * console.error(e);
7398
+ * throw e;
7399
+ * });
7400
+ *
7401
+ * ```
6629
7402
  *
6630
7403
  * @param params - Parameters for request
6631
7404
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6772,6 +7545,64 @@ export namespace securitycenter_v1beta1 {
6772
7545
 
6773
7546
  /**
6774
7547
  * Creates a source.
7548
+ * @example
7549
+ * ```js
7550
+ * // Before running the sample:
7551
+ * // - Enable the API at:
7552
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7553
+ * // - Login into gcloud by running:
7554
+ * // ```sh
7555
+ * // $ gcloud auth application-default login
7556
+ * // ```
7557
+ * // - Install the npm module by running:
7558
+ * // ```sh
7559
+ * // $ npm install googleapis
7560
+ * // ```
7561
+ *
7562
+ * const {google} = require('googleapis');
7563
+ * const securitycenter = google.securitycenter('v1beta1');
7564
+ *
7565
+ * async function main() {
7566
+ * const auth = new google.auth.GoogleAuth({
7567
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7568
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7569
+ * });
7570
+ *
7571
+ * // Acquire an auth client, and bind it to all future calls
7572
+ * const authClient = await auth.getClient();
7573
+ * google.options({auth: authClient});
7574
+ *
7575
+ * // Do the magic
7576
+ * const res = await securitycenter.organizations.sources.create({
7577
+ * // Required. Resource name of the new source's parent. Its format should be "organizations/[organization_id]".
7578
+ * parent: 'organizations/my-organization',
7579
+ *
7580
+ * // Request body metadata
7581
+ * requestBody: {
7582
+ * // request body parameters
7583
+ * // {
7584
+ * // "description": "my_description",
7585
+ * // "displayName": "my_displayName",
7586
+ * // "name": "my_name"
7587
+ * // }
7588
+ * },
7589
+ * });
7590
+ * console.log(res.data);
7591
+ *
7592
+ * // Example response
7593
+ * // {
7594
+ * // "description": "my_description",
7595
+ * // "displayName": "my_displayName",
7596
+ * // "name": "my_name"
7597
+ * // }
7598
+ * }
7599
+ *
7600
+ * main().catch(e => {
7601
+ * console.error(e);
7602
+ * throw e;
7603
+ * });
7604
+ *
7605
+ * ```
6775
7606
  *
6776
7607
  * @param params - Parameters for request
6777
7608
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6864,6 +7695,54 @@ export namespace securitycenter_v1beta1 {
6864
7695
 
6865
7696
  /**
6866
7697
  * Gets a source.
7698
+ * @example
7699
+ * ```js
7700
+ * // Before running the sample:
7701
+ * // - Enable the API at:
7702
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7703
+ * // - Login into gcloud by running:
7704
+ * // ```sh
7705
+ * // $ gcloud auth application-default login
7706
+ * // ```
7707
+ * // - Install the npm module by running:
7708
+ * // ```sh
7709
+ * // $ npm install googleapis
7710
+ * // ```
7711
+ *
7712
+ * const {google} = require('googleapis');
7713
+ * const securitycenter = google.securitycenter('v1beta1');
7714
+ *
7715
+ * async function main() {
7716
+ * const auth = new google.auth.GoogleAuth({
7717
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7718
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7719
+ * });
7720
+ *
7721
+ * // Acquire an auth client, and bind it to all future calls
7722
+ * const authClient = await auth.getClient();
7723
+ * google.options({auth: authClient});
7724
+ *
7725
+ * // Do the magic
7726
+ * const res = await securitycenter.organizations.sources.get({
7727
+ * // Required. Relative resource name of the source. Its format is "organizations/[organization_id]/source/[source_id]".
7728
+ * name: 'organizations/my-organization/sources/my-source',
7729
+ * });
7730
+ * console.log(res.data);
7731
+ *
7732
+ * // Example response
7733
+ * // {
7734
+ * // "description": "my_description",
7735
+ * // "displayName": "my_displayName",
7736
+ * // "name": "my_name"
7737
+ * // }
7738
+ * }
7739
+ *
7740
+ * main().catch(e => {
7741
+ * console.error(e);
7742
+ * throw e;
7743
+ * });
7744
+ *
7745
+ * ```
6867
7746
  *
6868
7747
  * @param params - Parameters for request
6869
7748
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6953,6 +7832,63 @@ export namespace securitycenter_v1beta1 {
6953
7832
 
6954
7833
  /**
6955
7834
  * Gets the access control policy on the specified Source.
7835
+ * @example
7836
+ * ```js
7837
+ * // Before running the sample:
7838
+ * // - Enable the API at:
7839
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7840
+ * // - Login into gcloud by running:
7841
+ * // ```sh
7842
+ * // $ gcloud auth application-default login
7843
+ * // ```
7844
+ * // - Install the npm module by running:
7845
+ * // ```sh
7846
+ * // $ npm install googleapis
7847
+ * // ```
7848
+ *
7849
+ * const {google} = require('googleapis');
7850
+ * const securitycenter = google.securitycenter('v1beta1');
7851
+ *
7852
+ * async function main() {
7853
+ * const auth = new google.auth.GoogleAuth({
7854
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7855
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7856
+ * });
7857
+ *
7858
+ * // Acquire an auth client, and bind it to all future calls
7859
+ * const authClient = await auth.getClient();
7860
+ * google.options({auth: authClient});
7861
+ *
7862
+ * // Do the magic
7863
+ * const res = await securitycenter.organizations.sources.getIamPolicy({
7864
+ * // 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.
7865
+ * resource: 'organizations/my-organization/sources/my-source',
7866
+ *
7867
+ * // Request body metadata
7868
+ * requestBody: {
7869
+ * // request body parameters
7870
+ * // {
7871
+ * // "options": {}
7872
+ * // }
7873
+ * },
7874
+ * });
7875
+ * console.log(res.data);
7876
+ *
7877
+ * // Example response
7878
+ * // {
7879
+ * // "auditConfigs": [],
7880
+ * // "bindings": [],
7881
+ * // "etag": "my_etag",
7882
+ * // "version": 0
7883
+ * // }
7884
+ * }
7885
+ *
7886
+ * main().catch(e => {
7887
+ * console.error(e);
7888
+ * throw e;
7889
+ * });
7890
+ *
7891
+ * ```
6956
7892
  *
6957
7893
  * @param params - Parameters for request
6958
7894
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7045,6 +7981,57 @@ export namespace securitycenter_v1beta1 {
7045
7981
 
7046
7982
  /**
7047
7983
  * Lists all sources belonging to an organization.
7984
+ * @example
7985
+ * ```js
7986
+ * // Before running the sample:
7987
+ * // - Enable the API at:
7988
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7989
+ * // - Login into gcloud by running:
7990
+ * // ```sh
7991
+ * // $ gcloud auth application-default login
7992
+ * // ```
7993
+ * // - Install the npm module by running:
7994
+ * // ```sh
7995
+ * // $ npm install googleapis
7996
+ * // ```
7997
+ *
7998
+ * const {google} = require('googleapis');
7999
+ * const securitycenter = google.securitycenter('v1beta1');
8000
+ *
8001
+ * async function main() {
8002
+ * const auth = new google.auth.GoogleAuth({
8003
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8004
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8005
+ * });
8006
+ *
8007
+ * // Acquire an auth client, and bind it to all future calls
8008
+ * const authClient = await auth.getClient();
8009
+ * google.options({auth: authClient});
8010
+ *
8011
+ * // Do the magic
8012
+ * const res = await securitycenter.organizations.sources.list({
8013
+ * // The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
8014
+ * pageSize: 'placeholder-value',
8015
+ * // 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.
8016
+ * pageToken: 'placeholder-value',
8017
+ * // Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]".
8018
+ * parent: 'organizations/my-organization',
8019
+ * });
8020
+ * console.log(res.data);
8021
+ *
8022
+ * // Example response
8023
+ * // {
8024
+ * // "nextPageToken": "my_nextPageToken",
8025
+ * // "sources": []
8026
+ * // }
8027
+ * }
8028
+ *
8029
+ * main().catch(e => {
8030
+ * console.error(e);
8031
+ * throw e;
8032
+ * });
8033
+ *
8034
+ * ```
7048
8035
  *
7049
8036
  * @param params - Parameters for request
7050
8037
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7137,6 +8124,66 @@ export namespace securitycenter_v1beta1 {
7137
8124
 
7138
8125
  /**
7139
8126
  * Updates a source.
8127
+ * @example
8128
+ * ```js
8129
+ * // Before running the sample:
8130
+ * // - Enable the API at:
8131
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8132
+ * // - Login into gcloud by running:
8133
+ * // ```sh
8134
+ * // $ gcloud auth application-default login
8135
+ * // ```
8136
+ * // - Install the npm module by running:
8137
+ * // ```sh
8138
+ * // $ npm install googleapis
8139
+ * // ```
8140
+ *
8141
+ * const {google} = require('googleapis');
8142
+ * const securitycenter = google.securitycenter('v1beta1');
8143
+ *
8144
+ * async function main() {
8145
+ * const auth = new google.auth.GoogleAuth({
8146
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8147
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8148
+ * });
8149
+ *
8150
+ * // Acquire an auth client, and bind it to all future calls
8151
+ * const authClient = await auth.getClient();
8152
+ * google.options({auth: authClient});
8153
+ *
8154
+ * // Do the magic
8155
+ * const res = await securitycenter.organizations.sources.patch({
8156
+ * // 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\}"
8157
+ * name: 'organizations/my-organization/sources/my-source',
8158
+ * // The FieldMask to use when updating the source resource.
8159
+ * updateMask: 'placeholder-value',
8160
+ *
8161
+ * // Request body metadata
8162
+ * requestBody: {
8163
+ * // request body parameters
8164
+ * // {
8165
+ * // "description": "my_description",
8166
+ * // "displayName": "my_displayName",
8167
+ * // "name": "my_name"
8168
+ * // }
8169
+ * },
8170
+ * });
8171
+ * console.log(res.data);
8172
+ *
8173
+ * // Example response
8174
+ * // {
8175
+ * // "description": "my_description",
8176
+ * // "displayName": "my_displayName",
8177
+ * // "name": "my_name"
8178
+ * // }
8179
+ * }
8180
+ *
8181
+ * main().catch(e => {
8182
+ * console.error(e);
8183
+ * throw e;
8184
+ * });
8185
+ *
8186
+ * ```
7140
8187
  *
7141
8188
  * @param params - Parameters for request
7142
8189
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7226,6 +8273,64 @@ export namespace securitycenter_v1beta1 {
7226
8273
 
7227
8274
  /**
7228
8275
  * Sets the access control policy on the specified Source.
8276
+ * @example
8277
+ * ```js
8278
+ * // Before running the sample:
8279
+ * // - Enable the API at:
8280
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8281
+ * // - Login into gcloud by running:
8282
+ * // ```sh
8283
+ * // $ gcloud auth application-default login
8284
+ * // ```
8285
+ * // - Install the npm module by running:
8286
+ * // ```sh
8287
+ * // $ npm install googleapis
8288
+ * // ```
8289
+ *
8290
+ * const {google} = require('googleapis');
8291
+ * const securitycenter = google.securitycenter('v1beta1');
8292
+ *
8293
+ * async function main() {
8294
+ * const auth = new google.auth.GoogleAuth({
8295
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8296
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8297
+ * });
8298
+ *
8299
+ * // Acquire an auth client, and bind it to all future calls
8300
+ * const authClient = await auth.getClient();
8301
+ * google.options({auth: authClient});
8302
+ *
8303
+ * // Do the magic
8304
+ * const res = await securitycenter.organizations.sources.setIamPolicy({
8305
+ * // 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.
8306
+ * resource: 'organizations/my-organization/sources/my-source',
8307
+ *
8308
+ * // Request body metadata
8309
+ * requestBody: {
8310
+ * // request body parameters
8311
+ * // {
8312
+ * // "policy": {},
8313
+ * // "updateMask": "my_updateMask"
8314
+ * // }
8315
+ * },
8316
+ * });
8317
+ * console.log(res.data);
8318
+ *
8319
+ * // Example response
8320
+ * // {
8321
+ * // "auditConfigs": [],
8322
+ * // "bindings": [],
8323
+ * // "etag": "my_etag",
8324
+ * // "version": 0
8325
+ * // }
8326
+ * }
8327
+ *
8328
+ * main().catch(e => {
8329
+ * console.error(e);
8330
+ * throw e;
8331
+ * });
8332
+ *
8333
+ * ```
7229
8334
  *
7230
8335
  * @param params - Parameters for request
7231
8336
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7318,6 +8423,60 @@ export namespace securitycenter_v1beta1 {
7318
8423
 
7319
8424
  /**
7320
8425
  * Returns the permissions that a caller has on the specified source.
8426
+ * @example
8427
+ * ```js
8428
+ * // Before running the sample:
8429
+ * // - Enable the API at:
8430
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8431
+ * // - Login into gcloud by running:
8432
+ * // ```sh
8433
+ * // $ gcloud auth application-default login
8434
+ * // ```
8435
+ * // - Install the npm module by running:
8436
+ * // ```sh
8437
+ * // $ npm install googleapis
8438
+ * // ```
8439
+ *
8440
+ * const {google} = require('googleapis');
8441
+ * const securitycenter = google.securitycenter('v1beta1');
8442
+ *
8443
+ * async function main() {
8444
+ * const auth = new google.auth.GoogleAuth({
8445
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8446
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8447
+ * });
8448
+ *
8449
+ * // Acquire an auth client, and bind it to all future calls
8450
+ * const authClient = await auth.getClient();
8451
+ * google.options({auth: authClient});
8452
+ *
8453
+ * // Do the magic
8454
+ * const res = await securitycenter.organizations.sources.testIamPermissions({
8455
+ * // 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.
8456
+ * resource: 'organizations/my-organization/sources/my-source',
8457
+ *
8458
+ * // Request body metadata
8459
+ * requestBody: {
8460
+ * // request body parameters
8461
+ * // {
8462
+ * // "permissions": []
8463
+ * // }
8464
+ * },
8465
+ * });
8466
+ * console.log(res.data);
8467
+ *
8468
+ * // Example response
8469
+ * // {
8470
+ * // "permissions": []
8471
+ * // }
8472
+ * }
8473
+ *
8474
+ * main().catch(e => {
8475
+ * console.error(e);
8476
+ * throw e;
8477
+ * });
8478
+ *
8479
+ * ```
7321
8480
  *
7322
8481
  * @param params - Parameters for request
7323
8482
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7508,6 +8667,80 @@ export namespace securitycenter_v1beta1 {
7508
8667
 
7509
8668
  /**
7510
8669
  * Creates a finding. The corresponding source must exist for finding creation to succeed.
8670
+ * @example
8671
+ * ```js
8672
+ * // Before running the sample:
8673
+ * // - Enable the API at:
8674
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8675
+ * // - Login into gcloud by running:
8676
+ * // ```sh
8677
+ * // $ gcloud auth application-default login
8678
+ * // ```
8679
+ * // - Install the npm module by running:
8680
+ * // ```sh
8681
+ * // $ npm install googleapis
8682
+ * // ```
8683
+ *
8684
+ * const {google} = require('googleapis');
8685
+ * const securitycenter = google.securitycenter('v1beta1');
8686
+ *
8687
+ * async function main() {
8688
+ * const auth = new google.auth.GoogleAuth({
8689
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8690
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8691
+ * });
8692
+ *
8693
+ * // Acquire an auth client, and bind it to all future calls
8694
+ * const authClient = await auth.getClient();
8695
+ * google.options({auth: authClient});
8696
+ *
8697
+ * // Do the magic
8698
+ * const res = await securitycenter.organizations.sources.findings.create({
8699
+ * // 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.
8700
+ * findingId: 'placeholder-value',
8701
+ * // Required. Resource name of the new finding's parent. Its format should be "organizations/[organization_id]/sources/[source_id]".
8702
+ * parent: 'organizations/my-organization/sources/my-source',
8703
+ *
8704
+ * // Request body metadata
8705
+ * requestBody: {
8706
+ * // request body parameters
8707
+ * // {
8708
+ * // "category": "my_category",
8709
+ * // "createTime": "my_createTime",
8710
+ * // "eventTime": "my_eventTime",
8711
+ * // "externalUri": "my_externalUri",
8712
+ * // "name": "my_name",
8713
+ * // "parent": "my_parent",
8714
+ * // "resourceName": "my_resourceName",
8715
+ * // "securityMarks": {},
8716
+ * // "sourceProperties": {},
8717
+ * // "state": "my_state"
8718
+ * // }
8719
+ * },
8720
+ * });
8721
+ * console.log(res.data);
8722
+ *
8723
+ * // Example response
8724
+ * // {
8725
+ * // "category": "my_category",
8726
+ * // "createTime": "my_createTime",
8727
+ * // "eventTime": "my_eventTime",
8728
+ * // "externalUri": "my_externalUri",
8729
+ * // "name": "my_name",
8730
+ * // "parent": "my_parent",
8731
+ * // "resourceName": "my_resourceName",
8732
+ * // "securityMarks": {},
8733
+ * // "sourceProperties": {},
8734
+ * // "state": "my_state"
8735
+ * // }
8736
+ * }
8737
+ *
8738
+ * main().catch(e => {
8739
+ * console.error(e);
8740
+ * throw e;
8741
+ * });
8742
+ *
8743
+ * ```
7511
8744
  *
7512
8745
  * @param params - Parameters for request
7513
8746
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7610,6 +8843,66 @@ export namespace securitycenter_v1beta1 {
7610
8843
 
7611
8844
  /**
7612
8845
  * 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: /v1beta1/organizations/{organization_id\}/sources/-/findings
8846
+ * @example
8847
+ * ```js
8848
+ * // Before running the sample:
8849
+ * // - Enable the API at:
8850
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8851
+ * // - Login into gcloud by running:
8852
+ * // ```sh
8853
+ * // $ gcloud auth application-default login
8854
+ * // ```
8855
+ * // - Install the npm module by running:
8856
+ * // ```sh
8857
+ * // $ npm install googleapis
8858
+ * // ```
8859
+ *
8860
+ * const {google} = require('googleapis');
8861
+ * const securitycenter = google.securitycenter('v1beta1');
8862
+ *
8863
+ * async function main() {
8864
+ * const auth = new google.auth.GoogleAuth({
8865
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8866
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8867
+ * });
8868
+ *
8869
+ * // Acquire an auth client, and bind it to all future calls
8870
+ * const authClient = await auth.getClient();
8871
+ * google.options({auth: authClient});
8872
+ *
8873
+ * // Do the magic
8874
+ * const res = await securitycenter.organizations.sources.findings.group({
8875
+ * // Required. Name of the source to groupBy. Its format is "organizations/[organization_id]/sources/[source_id]". To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id\}/sources/-
8876
+ * parent: 'organizations/my-organization/sources/my-source',
8877
+ *
8878
+ * // Request body metadata
8879
+ * requestBody: {
8880
+ * // request body parameters
8881
+ * // {
8882
+ * // "filter": "my_filter",
8883
+ * // "groupBy": "my_groupBy",
8884
+ * // "pageSize": 0,
8885
+ * // "pageToken": "my_pageToken",
8886
+ * // "readTime": "my_readTime"
8887
+ * // }
8888
+ * },
8889
+ * });
8890
+ * console.log(res.data);
8891
+ *
8892
+ * // Example response
8893
+ * // {
8894
+ * // "groupByResults": [],
8895
+ * // "nextPageToken": "my_nextPageToken",
8896
+ * // "readTime": "my_readTime"
8897
+ * // }
8898
+ * }
8899
+ *
8900
+ * main().catch(e => {
8901
+ * console.error(e);
8902
+ * throw e;
8903
+ * });
8904
+ *
8905
+ * ```
7613
8906
  *
7614
8907
  * @param params - Parameters for request
7615
8908
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7704,6 +8997,67 @@ export namespace securitycenter_v1beta1 {
7704
8997
 
7705
8998
  /**
7706
8999
  * Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id\}/sources/-/findings
9000
+ * @example
9001
+ * ```js
9002
+ * // Before running the sample:
9003
+ * // - Enable the API at:
9004
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9005
+ * // - Login into gcloud by running:
9006
+ * // ```sh
9007
+ * // $ gcloud auth application-default login
9008
+ * // ```
9009
+ * // - Install the npm module by running:
9010
+ * // ```sh
9011
+ * // $ npm install googleapis
9012
+ * // ```
9013
+ *
9014
+ * const {google} = require('googleapis');
9015
+ * const securitycenter = google.securitycenter('v1beta1');
9016
+ *
9017
+ * async function main() {
9018
+ * const auth = new google.auth.GoogleAuth({
9019
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9020
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9021
+ * });
9022
+ *
9023
+ * // Acquire an auth client, and bind it to all future calls
9024
+ * const authClient = await auth.getClient();
9025
+ * google.options({auth: authClient});
9026
+ *
9027
+ * // Do the magic
9028
+ * const res = await securitycenter.organizations.sources.findings.list({
9029
+ * // Optional. A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.
9030
+ * fieldMask: 'placeholder-value',
9031
+ * // 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 not 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. For example, `source_properties.size = 100` is a valid filter string.
9032
+ * filter: 'placeholder-value',
9033
+ * // 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.
9034
+ * orderBy: 'placeholder-value',
9035
+ * // The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
9036
+ * pageSize: 'placeholder-value',
9037
+ * // 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.
9038
+ * pageToken: 'placeholder-value',
9039
+ * // Required. Name of the source the findings belong to. Its format is "organizations/[organization_id]/sources/[source_id]". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id\}/sources/-
9040
+ * parent: 'organizations/my-organization/sources/my-source',
9041
+ * // 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.
9042
+ * readTime: 'placeholder-value',
9043
+ * });
9044
+ * console.log(res.data);
9045
+ *
9046
+ * // Example response
9047
+ * // {
9048
+ * // "findings": [],
9049
+ * // "nextPageToken": "my_nextPageToken",
9050
+ * // "readTime": "my_readTime",
9051
+ * // "totalSize": 0
9052
+ * // }
9053
+ * }
9054
+ *
9055
+ * main().catch(e => {
9056
+ * console.error(e);
9057
+ * throw e;
9058
+ * });
9059
+ *
9060
+ * ```
7707
9061
  *
7708
9062
  * @param params - Parameters for request
7709
9063
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7798,6 +9152,80 @@ export namespace securitycenter_v1beta1 {
7798
9152
 
7799
9153
  /**
7800
9154
  * Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.
9155
+ * @example
9156
+ * ```js
9157
+ * // Before running the sample:
9158
+ * // - Enable the API at:
9159
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9160
+ * // - Login into gcloud by running:
9161
+ * // ```sh
9162
+ * // $ gcloud auth application-default login
9163
+ * // ```
9164
+ * // - Install the npm module by running:
9165
+ * // ```sh
9166
+ * // $ npm install googleapis
9167
+ * // ```
9168
+ *
9169
+ * const {google} = require('googleapis');
9170
+ * const securitycenter = google.securitycenter('v1beta1');
9171
+ *
9172
+ * async function main() {
9173
+ * const auth = new google.auth.GoogleAuth({
9174
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9175
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9176
+ * });
9177
+ *
9178
+ * // Acquire an auth client, and bind it to all future calls
9179
+ * const authClient = await auth.getClient();
9180
+ * google.options({auth: authClient});
9181
+ *
9182
+ * // Do the magic
9183
+ * const res = await securitycenter.organizations.sources.findings.patch({
9184
+ * // 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\}"
9185
+ * name: 'organizations/my-organization/sources/my-source/findings/my-finding',
9186
+ * // The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding.
9187
+ * updateMask: 'placeholder-value',
9188
+ *
9189
+ * // Request body metadata
9190
+ * requestBody: {
9191
+ * // request body parameters
9192
+ * // {
9193
+ * // "category": "my_category",
9194
+ * // "createTime": "my_createTime",
9195
+ * // "eventTime": "my_eventTime",
9196
+ * // "externalUri": "my_externalUri",
9197
+ * // "name": "my_name",
9198
+ * // "parent": "my_parent",
9199
+ * // "resourceName": "my_resourceName",
9200
+ * // "securityMarks": {},
9201
+ * // "sourceProperties": {},
9202
+ * // "state": "my_state"
9203
+ * // }
9204
+ * },
9205
+ * });
9206
+ * console.log(res.data);
9207
+ *
9208
+ * // Example response
9209
+ * // {
9210
+ * // "category": "my_category",
9211
+ * // "createTime": "my_createTime",
9212
+ * // "eventTime": "my_eventTime",
9213
+ * // "externalUri": "my_externalUri",
9214
+ * // "name": "my_name",
9215
+ * // "parent": "my_parent",
9216
+ * // "resourceName": "my_resourceName",
9217
+ * // "securityMarks": {},
9218
+ * // "sourceProperties": {},
9219
+ * // "state": "my_state"
9220
+ * // }
9221
+ * }
9222
+ *
9223
+ * main().catch(e => {
9224
+ * console.error(e);
9225
+ * throw e;
9226
+ * });
9227
+ *
9228
+ * ```
7801
9229
  *
7802
9230
  * @param params - Parameters for request
7803
9231
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7897,6 +9325,70 @@ export namespace securitycenter_v1beta1 {
7897
9325
 
7898
9326
  /**
7899
9327
  * Updates the state of a finding.
9328
+ * @example
9329
+ * ```js
9330
+ * // Before running the sample:
9331
+ * // - Enable the API at:
9332
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9333
+ * // - Login into gcloud by running:
9334
+ * // ```sh
9335
+ * // $ gcloud auth application-default login
9336
+ * // ```
9337
+ * // - Install the npm module by running:
9338
+ * // ```sh
9339
+ * // $ npm install googleapis
9340
+ * // ```
9341
+ *
9342
+ * const {google} = require('googleapis');
9343
+ * const securitycenter = google.securitycenter('v1beta1');
9344
+ *
9345
+ * async function main() {
9346
+ * const auth = new google.auth.GoogleAuth({
9347
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9348
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9349
+ * });
9350
+ *
9351
+ * // Acquire an auth client, and bind it to all future calls
9352
+ * const authClient = await auth.getClient();
9353
+ * google.options({auth: authClient});
9354
+ *
9355
+ * // Do the magic
9356
+ * const res = await securitycenter.organizations.sources.findings.setState({
9357
+ * // Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/sources/{source_id\}/finding/{finding_id\}".
9358
+ * name: 'organizations/my-organization/sources/my-source/findings/my-finding',
9359
+ *
9360
+ * // Request body metadata
9361
+ * requestBody: {
9362
+ * // request body parameters
9363
+ * // {
9364
+ * // "startTime": "my_startTime",
9365
+ * // "state": "my_state"
9366
+ * // }
9367
+ * },
9368
+ * });
9369
+ * console.log(res.data);
9370
+ *
9371
+ * // Example response
9372
+ * // {
9373
+ * // "category": "my_category",
9374
+ * // "createTime": "my_createTime",
9375
+ * // "eventTime": "my_eventTime",
9376
+ * // "externalUri": "my_externalUri",
9377
+ * // "name": "my_name",
9378
+ * // "parent": "my_parent",
9379
+ * // "resourceName": "my_resourceName",
9380
+ * // "securityMarks": {},
9381
+ * // "sourceProperties": {},
9382
+ * // "state": "my_state"
9383
+ * // }
9384
+ * }
9385
+ *
9386
+ * main().catch(e => {
9387
+ * console.error(e);
9388
+ * throw e;
9389
+ * });
9390
+ *
9391
+ * ```
7900
9392
  *
7901
9393
  * @param params - Parameters for request
7902
9394
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7999,6 +9491,67 @@ export namespace securitycenter_v1beta1 {
7999
9491
 
8000
9492
  /**
8001
9493
  * Updates security marks.
9494
+ * @example
9495
+ * ```js
9496
+ * // Before running the sample:
9497
+ * // - Enable the API at:
9498
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9499
+ * // - Login into gcloud by running:
9500
+ * // ```sh
9501
+ * // $ gcloud auth application-default login
9502
+ * // ```
9503
+ * // - Install the npm module by running:
9504
+ * // ```sh
9505
+ * // $ npm install googleapis
9506
+ * // ```
9507
+ *
9508
+ * const {google} = require('googleapis');
9509
+ * const securitycenter = google.securitycenter('v1beta1');
9510
+ *
9511
+ * async function main() {
9512
+ * const auth = new google.auth.GoogleAuth({
9513
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9514
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9515
+ * });
9516
+ *
9517
+ * // Acquire an auth client, and bind it to all future calls
9518
+ * const authClient = await auth.getClient();
9519
+ * google.options({auth: authClient});
9520
+ *
9521
+ * // Do the magic
9522
+ * const res =
9523
+ * await securitycenter.organizations.sources.findings.updateSecurityMarks({
9524
+ * // 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".
9525
+ * name: 'organizations/my-organization/sources/my-source/findings/my-finding/securityMarks',
9526
+ * // The time at which the updated SecurityMarks take effect.
9527
+ * startTime: 'placeholder-value',
9528
+ * // The FieldMask to use when updating the security marks resource.
9529
+ * updateMask: 'placeholder-value',
9530
+ *
9531
+ * // Request body metadata
9532
+ * requestBody: {
9533
+ * // request body parameters
9534
+ * // {
9535
+ * // "marks": {},
9536
+ * // "name": "my_name"
9537
+ * // }
9538
+ * },
9539
+ * });
9540
+ * console.log(res.data);
9541
+ *
9542
+ * // Example response
9543
+ * // {
9544
+ * // "marks": {},
9545
+ * // "name": "my_name"
9546
+ * // }
9547
+ * }
9548
+ *
9549
+ * main().catch(e => {
9550
+ * console.error(e);
9551
+ * throw e;
9552
+ * });
9553
+ *
9554
+ * ```
8002
9555
  *
8003
9556
  * @param params - Parameters for request
8004
9557
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.