@googleapis/securitycenter 13.0.1 → 14.1.0
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/CHANGELOG.md +27 -0
- package/build/v1.d.ts +11015 -5
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +1555 -1
- package/build/v1beta1.js.map +1 -1
- package/build/v1beta2.d.ts +3615 -6
- package/build/v1beta2.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +11015 -6
- package/v1beta1.ts +1554 -1
- package/v1beta2.ts +3615 -7
package/v1beta2.ts
CHANGED
|
@@ -228,6 +228,39 @@ export namespace securitycenter_v1beta2 {
|
|
|
228
228
|
*/
|
|
229
229
|
count?: string | null;
|
|
230
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Contains information about the AI model associated with the finding.
|
|
233
|
+
*/
|
|
234
|
+
export interface Schema$AiModel {
|
|
235
|
+
/**
|
|
236
|
+
* The platform on which the model is deployed.
|
|
237
|
+
*/
|
|
238
|
+
deploymentPlatform?: string | null;
|
|
239
|
+
/**
|
|
240
|
+
* The user defined display name of model. Ex. baseline-classification-model
|
|
241
|
+
*/
|
|
242
|
+
displayName?: string | null;
|
|
243
|
+
/**
|
|
244
|
+
* The domain of the model, for example, “image-classification”.
|
|
245
|
+
*/
|
|
246
|
+
domain?: string | null;
|
|
247
|
+
/**
|
|
248
|
+
* The name of the model library, for example, “transformers”.
|
|
249
|
+
*/
|
|
250
|
+
library?: string | null;
|
|
251
|
+
/**
|
|
252
|
+
* The region in which the model is used, for example, “us-central1”.
|
|
253
|
+
*/
|
|
254
|
+
location?: string | null;
|
|
255
|
+
/**
|
|
256
|
+
* The name of the AI model, for example, "gemini:1.0.0".
|
|
257
|
+
*/
|
|
258
|
+
name?: string | null;
|
|
259
|
+
/**
|
|
260
|
+
* The publisher of the model, for example, “google” or “nvidia”.
|
|
261
|
+
*/
|
|
262
|
+
publisher?: string | null;
|
|
263
|
+
}
|
|
231
264
|
/**
|
|
232
265
|
* Allowed IP rule.
|
|
233
266
|
*/
|
|
@@ -478,6 +511,15 @@ export namespace securitycenter_v1beta2 {
|
|
|
478
511
|
*/
|
|
479
512
|
storagePool?: string | null;
|
|
480
513
|
}
|
|
514
|
+
/**
|
|
515
|
+
* The destination big query dataset to export findings to.
|
|
516
|
+
*/
|
|
517
|
+
export interface Schema$BigQueryDestination {
|
|
518
|
+
/**
|
|
519
|
+
* Required. The relative resource name of the destination dataset, in the form projects/{projectId\}/datasets/{datasetId\}.
|
|
520
|
+
*/
|
|
521
|
+
dataset?: string | null;
|
|
522
|
+
}
|
|
481
523
|
/**
|
|
482
524
|
* Contains details about a chokepoint, which is a resource or resource group where high-risk attack paths converge, based on [attack path simulations] (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations).
|
|
483
525
|
*/
|
|
@@ -889,6 +931,23 @@ export namespace securitycenter_v1beta2 {
|
|
|
889
931
|
*/
|
|
890
932
|
maxRetentionAllowed?: string | null;
|
|
891
933
|
}
|
|
934
|
+
/**
|
|
935
|
+
* Vertex AI dataset associated with the finding.
|
|
936
|
+
*/
|
|
937
|
+
export interface Schema$Dataset {
|
|
938
|
+
/**
|
|
939
|
+
* The user defined display name of dataset, e.g. plants-dataset
|
|
940
|
+
*/
|
|
941
|
+
displayName?: string | null;
|
|
942
|
+
/**
|
|
943
|
+
* Resource name of the dataset, e.g. projects/{project\}/locations/{location\}/datasets/2094040236064505856
|
|
944
|
+
*/
|
|
945
|
+
name?: string | null;
|
|
946
|
+
/**
|
|
947
|
+
* Data source, such as BigQuery source URI, e.g. bq://scc-nexus-test.AIPPtest.gsod
|
|
948
|
+
*/
|
|
949
|
+
source?: string | null;
|
|
950
|
+
}
|
|
892
951
|
/**
|
|
893
952
|
* Denied IP rule.
|
|
894
953
|
*/
|
|
@@ -1027,6 +1086,23 @@ export namespace securitycenter_v1beta2 {
|
|
|
1027
1086
|
*/
|
|
1028
1087
|
totalExfiltratedBytes?: string | null;
|
|
1029
1088
|
}
|
|
1089
|
+
/**
|
|
1090
|
+
* The LRO metadata for a ExportFindings request.
|
|
1091
|
+
*/
|
|
1092
|
+
export interface Schema$ExportFindingsMetadata {
|
|
1093
|
+
/**
|
|
1094
|
+
* Required. The destination big query dataset to export findings to.
|
|
1095
|
+
*/
|
|
1096
|
+
bigQueryDestination?: Schema$BigQueryDestination;
|
|
1097
|
+
/**
|
|
1098
|
+
* Optional. Timestamp at which export was started
|
|
1099
|
+
*/
|
|
1100
|
+
exportStartTime?: string | null;
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* The response to a ExportFindings request. Contains the LRO information.
|
|
1104
|
+
*/
|
|
1105
|
+
export interface Schema$ExportFindingsResponse {}
|
|
1030
1106
|
/**
|
|
1031
1107
|
* 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.
|
|
1032
1108
|
*/
|
|
@@ -1064,6 +1140,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
1064
1140
|
* The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
|
|
1065
1141
|
*/
|
|
1066
1142
|
hashedSize?: string | null;
|
|
1143
|
+
/**
|
|
1144
|
+
* Operation(s) performed on a file.
|
|
1145
|
+
*/
|
|
1146
|
+
operations?: Schema$FileOperation[];
|
|
1067
1147
|
/**
|
|
1068
1148
|
* True when the hash covers only a prefix of the file.
|
|
1069
1149
|
*/
|
|
@@ -1081,6 +1161,15 @@ export namespace securitycenter_v1beta2 {
|
|
|
1081
1161
|
*/
|
|
1082
1162
|
size?: string | null;
|
|
1083
1163
|
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Operation(s) performed on a file.
|
|
1166
|
+
*/
|
|
1167
|
+
export interface Schema$FileOperation {
|
|
1168
|
+
/**
|
|
1169
|
+
* The type of the operation
|
|
1170
|
+
*/
|
|
1171
|
+
type?: string | null;
|
|
1172
|
+
}
|
|
1084
1173
|
/**
|
|
1085
1174
|
* 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.
|
|
1086
1175
|
*/
|
|
@@ -1093,6 +1182,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
1093
1182
|
* AffectedResources associated with the finding.
|
|
1094
1183
|
*/
|
|
1095
1184
|
affectedResources?: Schema$AffectedResources;
|
|
1185
|
+
/**
|
|
1186
|
+
* The AI model associated with the finding.
|
|
1187
|
+
*/
|
|
1188
|
+
aiModel?: Schema$AiModel;
|
|
1096
1189
|
/**
|
|
1097
1190
|
* Represents an application associated with the finding.
|
|
1098
1191
|
*/
|
|
@@ -1319,6 +1412,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
1319
1412
|
* 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.
|
|
1320
1413
|
*/
|
|
1321
1414
|
toxicCombination?: Schema$ToxicCombination;
|
|
1415
|
+
/**
|
|
1416
|
+
* VertexAi associated with the finding.
|
|
1417
|
+
*/
|
|
1418
|
+
vertexAi?: Schema$VertexAi;
|
|
1322
1419
|
/**
|
|
1323
1420
|
* Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
|
|
1324
1421
|
*/
|
|
@@ -2065,6 +2162,39 @@ export namespace securitycenter_v1beta2 {
|
|
|
2065
2162
|
*/
|
|
2066
2163
|
count?: string | null;
|
|
2067
2164
|
}
|
|
2165
|
+
/**
|
|
2166
|
+
* Contains information about the AI model associated with the finding.
|
|
2167
|
+
*/
|
|
2168
|
+
export interface Schema$GoogleCloudSecuritycenterV2AiModel {
|
|
2169
|
+
/**
|
|
2170
|
+
* The platform on which the model is deployed.
|
|
2171
|
+
*/
|
|
2172
|
+
deploymentPlatform?: string | null;
|
|
2173
|
+
/**
|
|
2174
|
+
* The user defined display name of model. Ex. baseline-classification-model
|
|
2175
|
+
*/
|
|
2176
|
+
displayName?: string | null;
|
|
2177
|
+
/**
|
|
2178
|
+
* The domain of the model, for example, “image-classification”.
|
|
2179
|
+
*/
|
|
2180
|
+
domain?: string | null;
|
|
2181
|
+
/**
|
|
2182
|
+
* The name of the model library, for example, “transformers”.
|
|
2183
|
+
*/
|
|
2184
|
+
library?: string | null;
|
|
2185
|
+
/**
|
|
2186
|
+
* The region in which the model is used, for example, “us-central1”.
|
|
2187
|
+
*/
|
|
2188
|
+
location?: string | null;
|
|
2189
|
+
/**
|
|
2190
|
+
* The name of the AI model, for example, "gemini:1.0.0".
|
|
2191
|
+
*/
|
|
2192
|
+
name?: string | null;
|
|
2193
|
+
/**
|
|
2194
|
+
* The publisher of the model, for example, “google” or “nvidia”.
|
|
2195
|
+
*/
|
|
2196
|
+
publisher?: string | null;
|
|
2197
|
+
}
|
|
2068
2198
|
/**
|
|
2069
2199
|
* Allowed IP rule.
|
|
2070
2200
|
*/
|
|
@@ -2750,6 +2880,23 @@ export namespace securitycenter_v1beta2 {
|
|
|
2750
2880
|
*/
|
|
2751
2881
|
maxRetentionAllowed?: string | null;
|
|
2752
2882
|
}
|
|
2883
|
+
/**
|
|
2884
|
+
* Vertex AI dataset associated with the finding.
|
|
2885
|
+
*/
|
|
2886
|
+
export interface Schema$GoogleCloudSecuritycenterV2Dataset {
|
|
2887
|
+
/**
|
|
2888
|
+
* The user defined display name of dataset, e.g. plants-dataset
|
|
2889
|
+
*/
|
|
2890
|
+
displayName?: string | null;
|
|
2891
|
+
/**
|
|
2892
|
+
* Resource name of the dataset, e.g. projects/{project\}/locations/{location\}/datasets/2094040236064505856
|
|
2893
|
+
*/
|
|
2894
|
+
name?: string | null;
|
|
2895
|
+
/**
|
|
2896
|
+
* Data source, such as a BigQuery source URI, e.g. bq://scc-nexus-test.AIPPtest.gsod
|
|
2897
|
+
*/
|
|
2898
|
+
source?: string | null;
|
|
2899
|
+
}
|
|
2753
2900
|
/**
|
|
2754
2901
|
* Denied IP rule.
|
|
2755
2902
|
*/
|
|
@@ -2915,6 +3062,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
2915
3062
|
* The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
|
|
2916
3063
|
*/
|
|
2917
3064
|
hashedSize?: string | null;
|
|
3065
|
+
/**
|
|
3066
|
+
* Operation(s) performed on a file.
|
|
3067
|
+
*/
|
|
3068
|
+
operations?: Schema$GoogleCloudSecuritycenterV2FileOperation[];
|
|
2918
3069
|
/**
|
|
2919
3070
|
* True when the hash covers only a prefix of the file.
|
|
2920
3071
|
*/
|
|
@@ -2932,6 +3083,15 @@ export namespace securitycenter_v1beta2 {
|
|
|
2932
3083
|
*/
|
|
2933
3084
|
size?: string | null;
|
|
2934
3085
|
}
|
|
3086
|
+
/**
|
|
3087
|
+
* Operation(s) performed on a file.
|
|
3088
|
+
*/
|
|
3089
|
+
export interface Schema$GoogleCloudSecuritycenterV2FileOperation {
|
|
3090
|
+
/**
|
|
3091
|
+
* The type of the operation
|
|
3092
|
+
*/
|
|
3093
|
+
type?: string | null;
|
|
3094
|
+
}
|
|
2935
3095
|
/**
|
|
2936
3096
|
* 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.
|
|
2937
3097
|
*/
|
|
@@ -2944,6 +3104,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
2944
3104
|
* AffectedResources associated with the finding.
|
|
2945
3105
|
*/
|
|
2946
3106
|
affectedResources?: Schema$GoogleCloudSecuritycenterV2AffectedResources;
|
|
3107
|
+
/**
|
|
3108
|
+
* The AI model associated with the finding.
|
|
3109
|
+
*/
|
|
3110
|
+
aiModel?: Schema$GoogleCloudSecuritycenterV2AiModel;
|
|
2947
3111
|
/**
|
|
2948
3112
|
* Represents an application associated with the finding.
|
|
2949
3113
|
*/
|
|
@@ -3113,7 +3277,7 @@ export namespace securitycenter_v1beta2 {
|
|
|
3113
3277
|
*/
|
|
3114
3278
|
muteUpdateTime?: string | null;
|
|
3115
3279
|
/**
|
|
3116
|
-
* 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\}`
|
|
3280
|
+
* 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\}`
|
|
3117
3281
|
*/
|
|
3118
3282
|
name?: string | null;
|
|
3119
3283
|
/**
|
|
@@ -3172,6 +3336,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
3172
3336
|
* 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.
|
|
3173
3337
|
*/
|
|
3174
3338
|
toxicCombination?: Schema$GoogleCloudSecuritycenterV2ToxicCombination;
|
|
3339
|
+
/**
|
|
3340
|
+
* VertexAi associated with the finding.
|
|
3341
|
+
*/
|
|
3342
|
+
vertexAi?: Schema$GoogleCloudSecuritycenterV2VertexAi;
|
|
3175
3343
|
/**
|
|
3176
3344
|
* Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
|
|
3177
3345
|
*/
|
|
@@ -3893,6 +4061,19 @@ export namespace securitycenter_v1beta2 {
|
|
|
3893
4061
|
*/
|
|
3894
4062
|
packageVersion?: string | null;
|
|
3895
4063
|
}
|
|
4064
|
+
/**
|
|
4065
|
+
* Vertex AI training pipeline associated with the finding.
|
|
4066
|
+
*/
|
|
4067
|
+
export interface Schema$GoogleCloudSecuritycenterV2Pipeline {
|
|
4068
|
+
/**
|
|
4069
|
+
* The user-defined display name of pipeline, e.g. plants-classification
|
|
4070
|
+
*/
|
|
4071
|
+
displayName?: string | null;
|
|
4072
|
+
/**
|
|
4073
|
+
* Resource name of the pipeline, e.g. projects/{project\}/locations/{location\}/trainingPipelines/5253428229225578496
|
|
4074
|
+
*/
|
|
4075
|
+
name?: string | null;
|
|
4076
|
+
}
|
|
3896
4077
|
/**
|
|
3897
4078
|
* A Kubernetes Pod.
|
|
3898
4079
|
*/
|
|
@@ -3988,6 +4169,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
3988
4169
|
* 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.
|
|
3989
4170
|
*/
|
|
3990
4171
|
script?: Schema$GoogleCloudSecuritycenterV2File;
|
|
4172
|
+
/**
|
|
4173
|
+
* The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
|
|
4174
|
+
*/
|
|
4175
|
+
userId?: string | null;
|
|
3991
4176
|
}
|
|
3992
4177
|
/**
|
|
3993
4178
|
* Indicates what signature matched this process.
|
|
@@ -4367,6 +4552,19 @@ export namespace securitycenter_v1beta2 {
|
|
|
4367
4552
|
*/
|
|
4368
4553
|
relatedFindings?: string[] | null;
|
|
4369
4554
|
}
|
|
4555
|
+
/**
|
|
4556
|
+
* Vertex AI-related information associated with the finding.
|
|
4557
|
+
*/
|
|
4558
|
+
export interface Schema$GoogleCloudSecuritycenterV2VertexAi {
|
|
4559
|
+
/**
|
|
4560
|
+
* Datasets associated with the finding.
|
|
4561
|
+
*/
|
|
4562
|
+
datasets?: Schema$GoogleCloudSecuritycenterV2Dataset[];
|
|
4563
|
+
/**
|
|
4564
|
+
* Pipelines associated with the finding.
|
|
4565
|
+
*/
|
|
4566
|
+
pipelines?: Schema$GoogleCloudSecuritycenterV2Pipeline[];
|
|
4567
|
+
}
|
|
4370
4568
|
/**
|
|
4371
4569
|
* Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
|
|
4372
4570
|
*/
|
|
@@ -4786,6 +4984,19 @@ export namespace securitycenter_v1beta2 {
|
|
|
4786
4984
|
*/
|
|
4787
4985
|
packageVersion?: string | null;
|
|
4788
4986
|
}
|
|
4987
|
+
/**
|
|
4988
|
+
* Vertex AI training pipeline associated with the finding.
|
|
4989
|
+
*/
|
|
4990
|
+
export interface Schema$Pipeline {
|
|
4991
|
+
/**
|
|
4992
|
+
* The user defined display name of pipeline, e.g. plants-classification
|
|
4993
|
+
*/
|
|
4994
|
+
displayName?: string | null;
|
|
4995
|
+
/**
|
|
4996
|
+
* Resource name of the pipeline, e.g. projects/{project\}/locations/{location\}/trainingPipelines/5253428229225578496
|
|
4997
|
+
*/
|
|
4998
|
+
name?: string | null;
|
|
4999
|
+
}
|
|
4789
5000
|
/**
|
|
4790
5001
|
* A Kubernetes Pod.
|
|
4791
5002
|
*/
|
|
@@ -4881,6 +5092,10 @@ export namespace securitycenter_v1beta2 {
|
|
|
4881
5092
|
* 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.
|
|
4882
5093
|
*/
|
|
4883
5094
|
script?: Schema$File;
|
|
5095
|
+
/**
|
|
5096
|
+
* The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
|
|
5097
|
+
*/
|
|
5098
|
+
userId?: string | null;
|
|
4884
5099
|
}
|
|
4885
5100
|
/**
|
|
4886
5101
|
* Indicates what signature matched this process.
|
|
@@ -5233,6 +5448,19 @@ export namespace securitycenter_v1beta2 {
|
|
|
5233
5448
|
*/
|
|
5234
5449
|
relatedFindings?: string[] | null;
|
|
5235
5450
|
}
|
|
5451
|
+
/**
|
|
5452
|
+
* Vertex AI-related information associated with the finding.
|
|
5453
|
+
*/
|
|
5454
|
+
export interface Schema$VertexAi {
|
|
5455
|
+
/**
|
|
5456
|
+
* Datasets associated with the finding.
|
|
5457
|
+
*/
|
|
5458
|
+
datasets?: Schema$Dataset[];
|
|
5459
|
+
/**
|
|
5460
|
+
* Pipelines associated with the finding.
|
|
5461
|
+
*/
|
|
5462
|
+
pipelines?: Schema$Pipeline[];
|
|
5463
|
+
}
|
|
5236
5464
|
/**
|
|
5237
5465
|
* Resource capturing the settings for the Virtual Machine Threat Detection service.
|
|
5238
5466
|
*/
|
|
@@ -5380,6 +5608,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
5380
5608
|
|
|
5381
5609
|
/**
|
|
5382
5610
|
* Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.
|
|
5611
|
+
* @example
|
|
5612
|
+
* ```js
|
|
5613
|
+
* // Before running the sample:
|
|
5614
|
+
* // - Enable the API at:
|
|
5615
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
5616
|
+
* // - Login into gcloud by running:
|
|
5617
|
+
* // ```sh
|
|
5618
|
+
* // $ gcloud auth application-default login
|
|
5619
|
+
* // ```
|
|
5620
|
+
* // - Install the npm module by running:
|
|
5621
|
+
* // ```sh
|
|
5622
|
+
* // $ npm install googleapis
|
|
5623
|
+
* // ```
|
|
5624
|
+
*
|
|
5625
|
+
* const {google} = require('googleapis');
|
|
5626
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
5627
|
+
*
|
|
5628
|
+
* async function main() {
|
|
5629
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5630
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5631
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5632
|
+
* });
|
|
5633
|
+
*
|
|
5634
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5635
|
+
* const authClient = await auth.getClient();
|
|
5636
|
+
* google.options({auth: authClient});
|
|
5637
|
+
*
|
|
5638
|
+
* // Do the magic
|
|
5639
|
+
* const res = await securitycenter.folders.getContainerThreatDetectionSettings({
|
|
5640
|
+
* // Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
5641
|
+
* name: 'folders/my-folder/containerThreatDetectionSettings',
|
|
5642
|
+
* });
|
|
5643
|
+
* console.log(res.data);
|
|
5644
|
+
*
|
|
5645
|
+
* // Example response
|
|
5646
|
+
* // {
|
|
5647
|
+
* // "modules": {},
|
|
5648
|
+
* // "name": "my_name",
|
|
5649
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
5650
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
5651
|
+
* // "updateTime": "my_updateTime"
|
|
5652
|
+
* // }
|
|
5653
|
+
* }
|
|
5654
|
+
*
|
|
5655
|
+
* main().catch(e => {
|
|
5656
|
+
* console.error(e);
|
|
5657
|
+
* throw e;
|
|
5658
|
+
* });
|
|
5659
|
+
*
|
|
5660
|
+
* ```
|
|
5383
5661
|
*
|
|
5384
5662
|
* @param params - Parameters for request
|
|
5385
5663
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5480,6 +5758,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
5480
5758
|
|
|
5481
5759
|
/**
|
|
5482
5760
|
* Get the EventThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetEventThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateEventThreatDetectionSettings for this purpose.
|
|
5761
|
+
* @example
|
|
5762
|
+
* ```js
|
|
5763
|
+
* // Before running the sample:
|
|
5764
|
+
* // - Enable the API at:
|
|
5765
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
5766
|
+
* // - Login into gcloud by running:
|
|
5767
|
+
* // ```sh
|
|
5768
|
+
* // $ gcloud auth application-default login
|
|
5769
|
+
* // ```
|
|
5770
|
+
* // - Install the npm module by running:
|
|
5771
|
+
* // ```sh
|
|
5772
|
+
* // $ npm install googleapis
|
|
5773
|
+
* // ```
|
|
5774
|
+
*
|
|
5775
|
+
* const {google} = require('googleapis');
|
|
5776
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
5777
|
+
*
|
|
5778
|
+
* async function main() {
|
|
5779
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5780
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5781
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5782
|
+
* });
|
|
5783
|
+
*
|
|
5784
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5785
|
+
* const authClient = await auth.getClient();
|
|
5786
|
+
* google.options({auth: authClient});
|
|
5787
|
+
*
|
|
5788
|
+
* // Do the magic
|
|
5789
|
+
* const res = await securitycenter.folders.getEventThreatDetectionSettings({
|
|
5790
|
+
* // Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
5791
|
+
* name: 'folders/my-folder/eventThreatDetectionSettings',
|
|
5792
|
+
* });
|
|
5793
|
+
* console.log(res.data);
|
|
5794
|
+
*
|
|
5795
|
+
* // Example response
|
|
5796
|
+
* // {
|
|
5797
|
+
* // "modules": {},
|
|
5798
|
+
* // "name": "my_name",
|
|
5799
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
5800
|
+
* // "updateTime": "my_updateTime"
|
|
5801
|
+
* // }
|
|
5802
|
+
* }
|
|
5803
|
+
*
|
|
5804
|
+
* main().catch(e => {
|
|
5805
|
+
* console.error(e);
|
|
5806
|
+
* throw e;
|
|
5807
|
+
* });
|
|
5808
|
+
*
|
|
5809
|
+
* ```
|
|
5483
5810
|
*
|
|
5484
5811
|
* @param params - Parameters for request
|
|
5485
5812
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5575,6 +5902,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
5575
5902
|
|
|
5576
5903
|
/**
|
|
5577
5904
|
* Get the RapidVulnerabilityDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetRapidVulnerabilityDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this purpose.
|
|
5905
|
+
* @example
|
|
5906
|
+
* ```js
|
|
5907
|
+
* // Before running the sample:
|
|
5908
|
+
* // - Enable the API at:
|
|
5909
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
5910
|
+
* // - Login into gcloud by running:
|
|
5911
|
+
* // ```sh
|
|
5912
|
+
* // $ gcloud auth application-default login
|
|
5913
|
+
* // ```
|
|
5914
|
+
* // - Install the npm module by running:
|
|
5915
|
+
* // ```sh
|
|
5916
|
+
* // $ npm install googleapis
|
|
5917
|
+
* // ```
|
|
5918
|
+
*
|
|
5919
|
+
* const {google} = require('googleapis');
|
|
5920
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
5921
|
+
*
|
|
5922
|
+
* async function main() {
|
|
5923
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5924
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5925
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5926
|
+
* });
|
|
5927
|
+
*
|
|
5928
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5929
|
+
* const authClient = await auth.getClient();
|
|
5930
|
+
* google.options({auth: authClient});
|
|
5931
|
+
*
|
|
5932
|
+
* // Do the magic
|
|
5933
|
+
* const res =
|
|
5934
|
+
* await securitycenter.folders.getRapidVulnerabilityDetectionSettings({
|
|
5935
|
+
* // Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
5936
|
+
* name: 'folders/my-folder/rapidVulnerabilityDetectionSettings',
|
|
5937
|
+
* });
|
|
5938
|
+
* console.log(res.data);
|
|
5939
|
+
*
|
|
5940
|
+
* // Example response
|
|
5941
|
+
* // {
|
|
5942
|
+
* // "modules": {},
|
|
5943
|
+
* // "name": "my_name",
|
|
5944
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
5945
|
+
* // "updateTime": "my_updateTime"
|
|
5946
|
+
* // }
|
|
5947
|
+
* }
|
|
5948
|
+
*
|
|
5949
|
+
* main().catch(e => {
|
|
5950
|
+
* console.error(e);
|
|
5951
|
+
* throw e;
|
|
5952
|
+
* });
|
|
5953
|
+
*
|
|
5954
|
+
* ```
|
|
5578
5955
|
*
|
|
5579
5956
|
* @param params - Parameters for request
|
|
5580
5957
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5675,6 +6052,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
5675
6052
|
|
|
5676
6053
|
/**
|
|
5677
6054
|
* Get the SecurityCenterSettings resource.
|
|
6055
|
+
* @example
|
|
6056
|
+
* ```js
|
|
6057
|
+
* // Before running the sample:
|
|
6058
|
+
* // - Enable the API at:
|
|
6059
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6060
|
+
* // - Login into gcloud by running:
|
|
6061
|
+
* // ```sh
|
|
6062
|
+
* // $ gcloud auth application-default login
|
|
6063
|
+
* // ```
|
|
6064
|
+
* // - Install the npm module by running:
|
|
6065
|
+
* // ```sh
|
|
6066
|
+
* // $ npm install googleapis
|
|
6067
|
+
* // ```
|
|
6068
|
+
*
|
|
6069
|
+
* const {google} = require('googleapis');
|
|
6070
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6071
|
+
*
|
|
6072
|
+
* async function main() {
|
|
6073
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6074
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6075
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6076
|
+
* });
|
|
6077
|
+
*
|
|
6078
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6079
|
+
* const authClient = await auth.getClient();
|
|
6080
|
+
* google.options({auth: authClient});
|
|
6081
|
+
*
|
|
6082
|
+
* // Do the magic
|
|
6083
|
+
* const res = await securitycenter.folders.getSecurityCenterSettings({
|
|
6084
|
+
* // Required. The name of the SecurityCenterSettings to retrieve. Format: organizations/{organization\}/securityCenterSettings Format: folders/{folder\}/securityCenterSettings Format: projects/{project\}/securityCenterSettings
|
|
6085
|
+
* name: 'folders/my-folder/securityCenterSettings',
|
|
6086
|
+
* });
|
|
6087
|
+
* console.log(res.data);
|
|
6088
|
+
*
|
|
6089
|
+
* // Example response
|
|
6090
|
+
* // {
|
|
6091
|
+
* // "logSinkProject": "my_logSinkProject",
|
|
6092
|
+
* // "name": "my_name",
|
|
6093
|
+
* // "onboardingTime": "my_onboardingTime",
|
|
6094
|
+
* // "orgServiceAccount": "my_orgServiceAccount"
|
|
6095
|
+
* // }
|
|
6096
|
+
* }
|
|
6097
|
+
*
|
|
6098
|
+
* main().catch(e => {
|
|
6099
|
+
* console.error(e);
|
|
6100
|
+
* throw e;
|
|
6101
|
+
* });
|
|
6102
|
+
*
|
|
6103
|
+
* ```
|
|
5678
6104
|
*
|
|
5679
6105
|
* @param params - Parameters for request
|
|
5680
6106
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5768,6 +6194,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
5768
6194
|
|
|
5769
6195
|
/**
|
|
5770
6196
|
* Get the SecurityHealthAnalyticsSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetSecurityHealthAnalyticsSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateSecurityHealthAnalyticsSettings for this purpose.
|
|
6197
|
+
* @example
|
|
6198
|
+
* ```js
|
|
6199
|
+
* // Before running the sample:
|
|
6200
|
+
* // - Enable the API at:
|
|
6201
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6202
|
+
* // - Login into gcloud by running:
|
|
6203
|
+
* // ```sh
|
|
6204
|
+
* // $ gcloud auth application-default login
|
|
6205
|
+
* // ```
|
|
6206
|
+
* // - Install the npm module by running:
|
|
6207
|
+
* // ```sh
|
|
6208
|
+
* // $ npm install googleapis
|
|
6209
|
+
* // ```
|
|
6210
|
+
*
|
|
6211
|
+
* const {google} = require('googleapis');
|
|
6212
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6213
|
+
*
|
|
6214
|
+
* async function main() {
|
|
6215
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6216
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6217
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6218
|
+
* });
|
|
6219
|
+
*
|
|
6220
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6221
|
+
* const authClient = await auth.getClient();
|
|
6222
|
+
* google.options({auth: authClient});
|
|
6223
|
+
*
|
|
6224
|
+
* // Do the magic
|
|
6225
|
+
* const res = await securitycenter.folders.getSecurityHealthAnalyticsSettings({
|
|
6226
|
+
* // Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
6227
|
+
* name: 'folders/my-folder/securityHealthAnalyticsSettings',
|
|
6228
|
+
* });
|
|
6229
|
+
* console.log(res.data);
|
|
6230
|
+
*
|
|
6231
|
+
* // Example response
|
|
6232
|
+
* // {
|
|
6233
|
+
* // "modules": {},
|
|
6234
|
+
* // "name": "my_name",
|
|
6235
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
6236
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6237
|
+
* // "updateTime": "my_updateTime"
|
|
6238
|
+
* // }
|
|
6239
|
+
* }
|
|
6240
|
+
*
|
|
6241
|
+
* main().catch(e => {
|
|
6242
|
+
* console.error(e);
|
|
6243
|
+
* throw e;
|
|
6244
|
+
* });
|
|
6245
|
+
*
|
|
6246
|
+
* ```
|
|
5771
6247
|
*
|
|
5772
6248
|
* @param params - Parameters for request
|
|
5773
6249
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5864,6 +6340,57 @@ export namespace securitycenter_v1beta2 {
|
|
|
5864
6340
|
|
|
5865
6341
|
/**
|
|
5866
6342
|
* Get the VirtualMachineThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetVirtualMachineThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for this purpose.
|
|
6343
|
+
* @example
|
|
6344
|
+
* ```js
|
|
6345
|
+
* // Before running the sample:
|
|
6346
|
+
* // - Enable the API at:
|
|
6347
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6348
|
+
* // - Login into gcloud by running:
|
|
6349
|
+
* // ```sh
|
|
6350
|
+
* // $ gcloud auth application-default login
|
|
6351
|
+
* // ```
|
|
6352
|
+
* // - Install the npm module by running:
|
|
6353
|
+
* // ```sh
|
|
6354
|
+
* // $ npm install googleapis
|
|
6355
|
+
* // ```
|
|
6356
|
+
*
|
|
6357
|
+
* const {google} = require('googleapis');
|
|
6358
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6359
|
+
*
|
|
6360
|
+
* async function main() {
|
|
6361
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6362
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6363
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6364
|
+
* });
|
|
6365
|
+
*
|
|
6366
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6367
|
+
* const authClient = await auth.getClient();
|
|
6368
|
+
* google.options({auth: authClient});
|
|
6369
|
+
*
|
|
6370
|
+
* // Do the magic
|
|
6371
|
+
* const res =
|
|
6372
|
+
* await securitycenter.folders.getVirtualMachineThreatDetectionSettings({
|
|
6373
|
+
* // Required. The name of the VirtualMachineThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
6374
|
+
* name: 'folders/my-folder/virtualMachineThreatDetectionSettings',
|
|
6375
|
+
* });
|
|
6376
|
+
* console.log(res.data);
|
|
6377
|
+
*
|
|
6378
|
+
* // Example response
|
|
6379
|
+
* // {
|
|
6380
|
+
* // "modules": {},
|
|
6381
|
+
* // "name": "my_name",
|
|
6382
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
6383
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6384
|
+
* // "updateTime": "my_updateTime"
|
|
6385
|
+
* // }
|
|
6386
|
+
* }
|
|
6387
|
+
*
|
|
6388
|
+
* main().catch(e => {
|
|
6389
|
+
* console.error(e);
|
|
6390
|
+
* throw e;
|
|
6391
|
+
* });
|
|
6392
|
+
*
|
|
6393
|
+
* ```
|
|
5867
6394
|
*
|
|
5868
6395
|
* @param params - Parameters for request
|
|
5869
6396
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5964,6 +6491,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
5964
6491
|
|
|
5965
6492
|
/**
|
|
5966
6493
|
* Get the WebSecurityScannerSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetWebSecurityScannerSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateWebSecurityScannerSettings for this purpose.
|
|
6494
|
+
* @example
|
|
6495
|
+
* ```js
|
|
6496
|
+
* // Before running the sample:
|
|
6497
|
+
* // - Enable the API at:
|
|
6498
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6499
|
+
* // - Login into gcloud by running:
|
|
6500
|
+
* // ```sh
|
|
6501
|
+
* // $ gcloud auth application-default login
|
|
6502
|
+
* // ```
|
|
6503
|
+
* // - Install the npm module by running:
|
|
6504
|
+
* // ```sh
|
|
6505
|
+
* // $ npm install googleapis
|
|
6506
|
+
* // ```
|
|
6507
|
+
*
|
|
6508
|
+
* const {google} = require('googleapis');
|
|
6509
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6510
|
+
*
|
|
6511
|
+
* async function main() {
|
|
6512
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6513
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6514
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6515
|
+
* });
|
|
6516
|
+
*
|
|
6517
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6518
|
+
* const authClient = await auth.getClient();
|
|
6519
|
+
* google.options({auth: authClient});
|
|
6520
|
+
*
|
|
6521
|
+
* // Do the magic
|
|
6522
|
+
* const res = await securitycenter.folders.getWebSecurityScannerSettings({
|
|
6523
|
+
* // Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
6524
|
+
* name: 'folders/my-folder/webSecurityScannerSettings',
|
|
6525
|
+
* });
|
|
6526
|
+
* console.log(res.data);
|
|
6527
|
+
*
|
|
6528
|
+
* // Example response
|
|
6529
|
+
* // {
|
|
6530
|
+
* // "modules": {},
|
|
6531
|
+
* // "name": "my_name",
|
|
6532
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6533
|
+
* // "updateTime": "my_updateTime"
|
|
6534
|
+
* // }
|
|
6535
|
+
* }
|
|
6536
|
+
*
|
|
6537
|
+
* main().catch(e => {
|
|
6538
|
+
* console.error(e);
|
|
6539
|
+
* throw e;
|
|
6540
|
+
* });
|
|
6541
|
+
*
|
|
6542
|
+
* ```
|
|
5967
6543
|
*
|
|
5968
6544
|
* @param params - Parameters for request
|
|
5969
6545
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6057,6 +6633,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
6057
6633
|
|
|
6058
6634
|
/**
|
|
6059
6635
|
* Update the ContainerThreatDetectionSettings resource.
|
|
6636
|
+
* @example
|
|
6637
|
+
* ```js
|
|
6638
|
+
* // Before running the sample:
|
|
6639
|
+
* // - Enable the API at:
|
|
6640
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6641
|
+
* // - Login into gcloud by running:
|
|
6642
|
+
* // ```sh
|
|
6643
|
+
* // $ gcloud auth application-default login
|
|
6644
|
+
* // ```
|
|
6645
|
+
* // - Install the npm module by running:
|
|
6646
|
+
* // ```sh
|
|
6647
|
+
* // $ npm install googleapis
|
|
6648
|
+
* // ```
|
|
6649
|
+
*
|
|
6650
|
+
* const {google} = require('googleapis');
|
|
6651
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6652
|
+
*
|
|
6653
|
+
* async function main() {
|
|
6654
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6655
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6656
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6657
|
+
* });
|
|
6658
|
+
*
|
|
6659
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6660
|
+
* const authClient = await auth.getClient();
|
|
6661
|
+
* google.options({auth: authClient});
|
|
6662
|
+
*
|
|
6663
|
+
* // Do the magic
|
|
6664
|
+
* const res =
|
|
6665
|
+
* await securitycenter.folders.updateContainerThreatDetectionSettings({
|
|
6666
|
+
* // Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
6667
|
+
* name: 'folders/my-folder/containerThreatDetectionSettings',
|
|
6668
|
+
* // The list of fields to be updated.
|
|
6669
|
+
* updateMask: 'placeholder-value',
|
|
6670
|
+
*
|
|
6671
|
+
* // Request body metadata
|
|
6672
|
+
* requestBody: {
|
|
6673
|
+
* // request body parameters
|
|
6674
|
+
* // {
|
|
6675
|
+
* // "modules": {},
|
|
6676
|
+
* // "name": "my_name",
|
|
6677
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
6678
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6679
|
+
* // "updateTime": "my_updateTime"
|
|
6680
|
+
* // }
|
|
6681
|
+
* },
|
|
6682
|
+
* });
|
|
6683
|
+
* console.log(res.data);
|
|
6684
|
+
*
|
|
6685
|
+
* // Example response
|
|
6686
|
+
* // {
|
|
6687
|
+
* // "modules": {},
|
|
6688
|
+
* // "name": "my_name",
|
|
6689
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
6690
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6691
|
+
* // "updateTime": "my_updateTime"
|
|
6692
|
+
* // }
|
|
6693
|
+
* }
|
|
6694
|
+
*
|
|
6695
|
+
* main().catch(e => {
|
|
6696
|
+
* console.error(e);
|
|
6697
|
+
* throw e;
|
|
6698
|
+
* });
|
|
6699
|
+
*
|
|
6700
|
+
* ```
|
|
6060
6701
|
*
|
|
6061
6702
|
* @param params - Parameters for request
|
|
6062
6703
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6157,6 +6798,68 @@ export namespace securitycenter_v1beta2 {
|
|
|
6157
6798
|
|
|
6158
6799
|
/**
|
|
6159
6800
|
* Update the EventThreatDetectionSettings resource.
|
|
6801
|
+
* @example
|
|
6802
|
+
* ```js
|
|
6803
|
+
* // Before running the sample:
|
|
6804
|
+
* // - Enable the API at:
|
|
6805
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6806
|
+
* // - Login into gcloud by running:
|
|
6807
|
+
* // ```sh
|
|
6808
|
+
* // $ gcloud auth application-default login
|
|
6809
|
+
* // ```
|
|
6810
|
+
* // - Install the npm module by running:
|
|
6811
|
+
* // ```sh
|
|
6812
|
+
* // $ npm install googleapis
|
|
6813
|
+
* // ```
|
|
6814
|
+
*
|
|
6815
|
+
* const {google} = require('googleapis');
|
|
6816
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6817
|
+
*
|
|
6818
|
+
* async function main() {
|
|
6819
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6820
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6821
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6822
|
+
* });
|
|
6823
|
+
*
|
|
6824
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6825
|
+
* const authClient = await auth.getClient();
|
|
6826
|
+
* google.options({auth: authClient});
|
|
6827
|
+
*
|
|
6828
|
+
* // Do the magic
|
|
6829
|
+
* const res = await securitycenter.folders.updateEventThreatDetectionSettings({
|
|
6830
|
+
* // Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
6831
|
+
* name: 'folders/my-folder/eventThreatDetectionSettings',
|
|
6832
|
+
* // The list of fields to be updated.
|
|
6833
|
+
* updateMask: 'placeholder-value',
|
|
6834
|
+
*
|
|
6835
|
+
* // Request body metadata
|
|
6836
|
+
* requestBody: {
|
|
6837
|
+
* // request body parameters
|
|
6838
|
+
* // {
|
|
6839
|
+
* // "modules": {},
|
|
6840
|
+
* // "name": "my_name",
|
|
6841
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6842
|
+
* // "updateTime": "my_updateTime"
|
|
6843
|
+
* // }
|
|
6844
|
+
* },
|
|
6845
|
+
* });
|
|
6846
|
+
* console.log(res.data);
|
|
6847
|
+
*
|
|
6848
|
+
* // Example response
|
|
6849
|
+
* // {
|
|
6850
|
+
* // "modules": {},
|
|
6851
|
+
* // "name": "my_name",
|
|
6852
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
6853
|
+
* // "updateTime": "my_updateTime"
|
|
6854
|
+
* // }
|
|
6855
|
+
* }
|
|
6856
|
+
*
|
|
6857
|
+
* main().catch(e => {
|
|
6858
|
+
* console.error(e);
|
|
6859
|
+
* throw e;
|
|
6860
|
+
* });
|
|
6861
|
+
*
|
|
6862
|
+
* ```
|
|
6160
6863
|
*
|
|
6161
6864
|
* @param params - Parameters for request
|
|
6162
6865
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6253,6 +6956,69 @@ export namespace securitycenter_v1beta2 {
|
|
|
6253
6956
|
|
|
6254
6957
|
/**
|
|
6255
6958
|
* Update the RapidVulnerabilityDetectionSettings resource.
|
|
6959
|
+
* @example
|
|
6960
|
+
* ```js
|
|
6961
|
+
* // Before running the sample:
|
|
6962
|
+
* // - Enable the API at:
|
|
6963
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
6964
|
+
* // - Login into gcloud by running:
|
|
6965
|
+
* // ```sh
|
|
6966
|
+
* // $ gcloud auth application-default login
|
|
6967
|
+
* // ```
|
|
6968
|
+
* // - Install the npm module by running:
|
|
6969
|
+
* // ```sh
|
|
6970
|
+
* // $ npm install googleapis
|
|
6971
|
+
* // ```
|
|
6972
|
+
*
|
|
6973
|
+
* const {google} = require('googleapis');
|
|
6974
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
6975
|
+
*
|
|
6976
|
+
* async function main() {
|
|
6977
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6978
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6979
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6980
|
+
* });
|
|
6981
|
+
*
|
|
6982
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6983
|
+
* const authClient = await auth.getClient();
|
|
6984
|
+
* google.options({auth: authClient});
|
|
6985
|
+
*
|
|
6986
|
+
* // Do the magic
|
|
6987
|
+
* const res =
|
|
6988
|
+
* await securitycenter.folders.updateRapidVulnerabilityDetectionSettings({
|
|
6989
|
+
* // The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
6990
|
+
* name: 'folders/my-folder/rapidVulnerabilityDetectionSettings',
|
|
6991
|
+
* // The list of fields to be updated.
|
|
6992
|
+
* updateMask: 'placeholder-value',
|
|
6993
|
+
*
|
|
6994
|
+
* // Request body metadata
|
|
6995
|
+
* requestBody: {
|
|
6996
|
+
* // request body parameters
|
|
6997
|
+
* // {
|
|
6998
|
+
* // "modules": {},
|
|
6999
|
+
* // "name": "my_name",
|
|
7000
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7001
|
+
* // "updateTime": "my_updateTime"
|
|
7002
|
+
* // }
|
|
7003
|
+
* },
|
|
7004
|
+
* });
|
|
7005
|
+
* console.log(res.data);
|
|
7006
|
+
*
|
|
7007
|
+
* // Example response
|
|
7008
|
+
* // {
|
|
7009
|
+
* // "modules": {},
|
|
7010
|
+
* // "name": "my_name",
|
|
7011
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7012
|
+
* // "updateTime": "my_updateTime"
|
|
7013
|
+
* // }
|
|
7014
|
+
* }
|
|
7015
|
+
*
|
|
7016
|
+
* main().catch(e => {
|
|
7017
|
+
* console.error(e);
|
|
7018
|
+
* throw e;
|
|
7019
|
+
* });
|
|
7020
|
+
*
|
|
7021
|
+
* ```
|
|
6256
7022
|
*
|
|
6257
7023
|
* @param params - Parameters for request
|
|
6258
7024
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6353,6 +7119,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
6353
7119
|
|
|
6354
7120
|
/**
|
|
6355
7121
|
* Update the SecurityHealthAnalyticsSettings resource.
|
|
7122
|
+
* @example
|
|
7123
|
+
* ```js
|
|
7124
|
+
* // Before running the sample:
|
|
7125
|
+
* // - Enable the API at:
|
|
7126
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
7127
|
+
* // - Login into gcloud by running:
|
|
7128
|
+
* // ```sh
|
|
7129
|
+
* // $ gcloud auth application-default login
|
|
7130
|
+
* // ```
|
|
7131
|
+
* // - Install the npm module by running:
|
|
7132
|
+
* // ```sh
|
|
7133
|
+
* // $ npm install googleapis
|
|
7134
|
+
* // ```
|
|
7135
|
+
*
|
|
7136
|
+
* const {google} = require('googleapis');
|
|
7137
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
7138
|
+
*
|
|
7139
|
+
* async function main() {
|
|
7140
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7141
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7142
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7143
|
+
* });
|
|
7144
|
+
*
|
|
7145
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7146
|
+
* const authClient = await auth.getClient();
|
|
7147
|
+
* google.options({auth: authClient});
|
|
7148
|
+
*
|
|
7149
|
+
* // Do the magic
|
|
7150
|
+
* const res =
|
|
7151
|
+
* await securitycenter.folders.updateSecurityHealthAnalyticsSettings({
|
|
7152
|
+
* // Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
7153
|
+
* name: 'folders/my-folder/securityHealthAnalyticsSettings',
|
|
7154
|
+
* // The list of fields to be updated.
|
|
7155
|
+
* updateMask: 'placeholder-value',
|
|
7156
|
+
*
|
|
7157
|
+
* // Request body metadata
|
|
7158
|
+
* requestBody: {
|
|
7159
|
+
* // request body parameters
|
|
7160
|
+
* // {
|
|
7161
|
+
* // "modules": {},
|
|
7162
|
+
* // "name": "my_name",
|
|
7163
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
7164
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7165
|
+
* // "updateTime": "my_updateTime"
|
|
7166
|
+
* // }
|
|
7167
|
+
* },
|
|
7168
|
+
* });
|
|
7169
|
+
* console.log(res.data);
|
|
7170
|
+
*
|
|
7171
|
+
* // Example response
|
|
7172
|
+
* // {
|
|
7173
|
+
* // "modules": {},
|
|
7174
|
+
* // "name": "my_name",
|
|
7175
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
7176
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7177
|
+
* // "updateTime": "my_updateTime"
|
|
7178
|
+
* // }
|
|
7179
|
+
* }
|
|
7180
|
+
*
|
|
7181
|
+
* main().catch(e => {
|
|
7182
|
+
* console.error(e);
|
|
7183
|
+
* throw e;
|
|
7184
|
+
* });
|
|
7185
|
+
*
|
|
7186
|
+
* ```
|
|
6356
7187
|
*
|
|
6357
7188
|
* @param params - Parameters for request
|
|
6358
7189
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6449,6 +7280,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
6449
7280
|
|
|
6450
7281
|
/**
|
|
6451
7282
|
* Update the VirtualMachineThreatDetectionSettings resource.
|
|
7283
|
+
* @example
|
|
7284
|
+
* ```js
|
|
7285
|
+
* // Before running the sample:
|
|
7286
|
+
* // - Enable the API at:
|
|
7287
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
7288
|
+
* // - Login into gcloud by running:
|
|
7289
|
+
* // ```sh
|
|
7290
|
+
* // $ gcloud auth application-default login
|
|
7291
|
+
* // ```
|
|
7292
|
+
* // - Install the npm module by running:
|
|
7293
|
+
* // ```sh
|
|
7294
|
+
* // $ npm install googleapis
|
|
7295
|
+
* // ```
|
|
7296
|
+
*
|
|
7297
|
+
* const {google} = require('googleapis');
|
|
7298
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
7299
|
+
*
|
|
7300
|
+
* async function main() {
|
|
7301
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7302
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7303
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7304
|
+
* });
|
|
7305
|
+
*
|
|
7306
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7307
|
+
* const authClient = await auth.getClient();
|
|
7308
|
+
* google.options({auth: authClient});
|
|
7309
|
+
*
|
|
7310
|
+
* // Do the magic
|
|
7311
|
+
* const res =
|
|
7312
|
+
* await securitycenter.folders.updateVirtualMachineThreatDetectionSettings({
|
|
7313
|
+
* // Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
7314
|
+
* name: 'folders/my-folder/virtualMachineThreatDetectionSettings',
|
|
7315
|
+
* // The list of fields to be updated.
|
|
7316
|
+
* updateMask: 'placeholder-value',
|
|
7317
|
+
*
|
|
7318
|
+
* // Request body metadata
|
|
7319
|
+
* requestBody: {
|
|
7320
|
+
* // request body parameters
|
|
7321
|
+
* // {
|
|
7322
|
+
* // "modules": {},
|
|
7323
|
+
* // "name": "my_name",
|
|
7324
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
7325
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7326
|
+
* // "updateTime": "my_updateTime"
|
|
7327
|
+
* // }
|
|
7328
|
+
* },
|
|
7329
|
+
* });
|
|
7330
|
+
* console.log(res.data);
|
|
7331
|
+
*
|
|
7332
|
+
* // Example response
|
|
7333
|
+
* // {
|
|
7334
|
+
* // "modules": {},
|
|
7335
|
+
* // "name": "my_name",
|
|
7336
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
7337
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7338
|
+
* // "updateTime": "my_updateTime"
|
|
7339
|
+
* // }
|
|
7340
|
+
* }
|
|
7341
|
+
*
|
|
7342
|
+
* main().catch(e => {
|
|
7343
|
+
* console.error(e);
|
|
7344
|
+
* throw e;
|
|
7345
|
+
* });
|
|
7346
|
+
*
|
|
7347
|
+
* ```
|
|
6452
7348
|
*
|
|
6453
7349
|
* @param params - Parameters for request
|
|
6454
7350
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6549,6 +7445,68 @@ export namespace securitycenter_v1beta2 {
|
|
|
6549
7445
|
|
|
6550
7446
|
/**
|
|
6551
7447
|
* Update the WebSecurityScannerSettings resource.
|
|
7448
|
+
* @example
|
|
7449
|
+
* ```js
|
|
7450
|
+
* // Before running the sample:
|
|
7451
|
+
* // - Enable the API at:
|
|
7452
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
7453
|
+
* // - Login into gcloud by running:
|
|
7454
|
+
* // ```sh
|
|
7455
|
+
* // $ gcloud auth application-default login
|
|
7456
|
+
* // ```
|
|
7457
|
+
* // - Install the npm module by running:
|
|
7458
|
+
* // ```sh
|
|
7459
|
+
* // $ npm install googleapis
|
|
7460
|
+
* // ```
|
|
7461
|
+
*
|
|
7462
|
+
* const {google} = require('googleapis');
|
|
7463
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
7464
|
+
*
|
|
7465
|
+
* async function main() {
|
|
7466
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7467
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7468
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7469
|
+
* });
|
|
7470
|
+
*
|
|
7471
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7472
|
+
* const authClient = await auth.getClient();
|
|
7473
|
+
* google.options({auth: authClient});
|
|
7474
|
+
*
|
|
7475
|
+
* // Do the magic
|
|
7476
|
+
* const res = await securitycenter.folders.updateWebSecurityScannerSettings({
|
|
7477
|
+
* // Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
7478
|
+
* name: 'folders/my-folder/webSecurityScannerSettings',
|
|
7479
|
+
* // The list of fields to be updated.
|
|
7480
|
+
* updateMask: 'placeholder-value',
|
|
7481
|
+
*
|
|
7482
|
+
* // Request body metadata
|
|
7483
|
+
* requestBody: {
|
|
7484
|
+
* // request body parameters
|
|
7485
|
+
* // {
|
|
7486
|
+
* // "modules": {},
|
|
7487
|
+
* // "name": "my_name",
|
|
7488
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7489
|
+
* // "updateTime": "my_updateTime"
|
|
7490
|
+
* // }
|
|
7491
|
+
* },
|
|
7492
|
+
* });
|
|
7493
|
+
* console.log(res.data);
|
|
7494
|
+
*
|
|
7495
|
+
* // Example response
|
|
7496
|
+
* // {
|
|
7497
|
+
* // "modules": {},
|
|
7498
|
+
* // "name": "my_name",
|
|
7499
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7500
|
+
* // "updateTime": "my_updateTime"
|
|
7501
|
+
* // }
|
|
7502
|
+
* }
|
|
7503
|
+
*
|
|
7504
|
+
* main().catch(e => {
|
|
7505
|
+
* console.error(e);
|
|
7506
|
+
* throw e;
|
|
7507
|
+
* });
|
|
7508
|
+
*
|
|
7509
|
+
* ```
|
|
6552
7510
|
*
|
|
6553
7511
|
* @param params - Parameters for request
|
|
6554
7512
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6795,6 +7753,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
6795
7753
|
|
|
6796
7754
|
/**
|
|
6797
7755
|
* Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
7756
|
+
* @example
|
|
7757
|
+
* ```js
|
|
7758
|
+
* // Before running the sample:
|
|
7759
|
+
* // - Enable the API at:
|
|
7760
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
7761
|
+
* // - Login into gcloud by running:
|
|
7762
|
+
* // ```sh
|
|
7763
|
+
* // $ gcloud auth application-default login
|
|
7764
|
+
* // ```
|
|
7765
|
+
* // - Install the npm module by running:
|
|
7766
|
+
* // ```sh
|
|
7767
|
+
* // $ npm install googleapis
|
|
7768
|
+
* // ```
|
|
7769
|
+
*
|
|
7770
|
+
* const {google} = require('googleapis');
|
|
7771
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
7772
|
+
*
|
|
7773
|
+
* async function main() {
|
|
7774
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7775
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7776
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7777
|
+
* });
|
|
7778
|
+
*
|
|
7779
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7780
|
+
* const authClient = await auth.getClient();
|
|
7781
|
+
* google.options({auth: authClient});
|
|
7782
|
+
*
|
|
7783
|
+
* // Do the magic
|
|
7784
|
+
* const res =
|
|
7785
|
+
* await securitycenter.folders.containerThreatDetectionSettings.calculate({
|
|
7786
|
+
* // Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
7787
|
+
* name: 'folders/my-folder/containerThreatDetectionSettings',
|
|
7788
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
7789
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
7790
|
+
* });
|
|
7791
|
+
* console.log(res.data);
|
|
7792
|
+
*
|
|
7793
|
+
* // Example response
|
|
7794
|
+
* // {
|
|
7795
|
+
* // "modules": {},
|
|
7796
|
+
* // "name": "my_name",
|
|
7797
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
7798
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7799
|
+
* // "updateTime": "my_updateTime"
|
|
7800
|
+
* // }
|
|
7801
|
+
* }
|
|
7802
|
+
*
|
|
7803
|
+
* main().catch(e => {
|
|
7804
|
+
* console.error(e);
|
|
7805
|
+
* throw e;
|
|
7806
|
+
* });
|
|
7807
|
+
*
|
|
7808
|
+
* ```
|
|
6798
7809
|
*
|
|
6799
7810
|
* @param params - Parameters for request
|
|
6800
7811
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6917,6 +7928,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
6917
7928
|
|
|
6918
7929
|
/**
|
|
6919
7930
|
* Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
7931
|
+
* @example
|
|
7932
|
+
* ```js
|
|
7933
|
+
* // Before running the sample:
|
|
7934
|
+
* // - Enable the API at:
|
|
7935
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
7936
|
+
* // - Login into gcloud by running:
|
|
7937
|
+
* // ```sh
|
|
7938
|
+
* // $ gcloud auth application-default login
|
|
7939
|
+
* // ```
|
|
7940
|
+
* // - Install the npm module by running:
|
|
7941
|
+
* // ```sh
|
|
7942
|
+
* // $ npm install googleapis
|
|
7943
|
+
* // ```
|
|
7944
|
+
*
|
|
7945
|
+
* const {google} = require('googleapis');
|
|
7946
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
7947
|
+
*
|
|
7948
|
+
* async function main() {
|
|
7949
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7950
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7951
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7952
|
+
* });
|
|
7953
|
+
*
|
|
7954
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7955
|
+
* const authClient = await auth.getClient();
|
|
7956
|
+
* google.options({auth: authClient});
|
|
7957
|
+
*
|
|
7958
|
+
* // Do the magic
|
|
7959
|
+
* const res =
|
|
7960
|
+
* await securitycenter.folders.eventThreatDetectionSettings.calculate({
|
|
7961
|
+
* // Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
7962
|
+
* name: 'folders/my-folder/eventThreatDetectionSettings',
|
|
7963
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
7964
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
7965
|
+
* });
|
|
7966
|
+
* console.log(res.data);
|
|
7967
|
+
*
|
|
7968
|
+
* // Example response
|
|
7969
|
+
* // {
|
|
7970
|
+
* // "modules": {},
|
|
7971
|
+
* // "name": "my_name",
|
|
7972
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
7973
|
+
* // "updateTime": "my_updateTime"
|
|
7974
|
+
* // }
|
|
7975
|
+
* }
|
|
7976
|
+
*
|
|
7977
|
+
* main().catch(e => {
|
|
7978
|
+
* console.error(e);
|
|
7979
|
+
* throw e;
|
|
7980
|
+
* });
|
|
7981
|
+
*
|
|
7982
|
+
* ```
|
|
6920
7983
|
*
|
|
6921
7984
|
* @param params - Parameters for request
|
|
6922
7985
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7035,13 +8098,63 @@ export namespace securitycenter_v1beta2 {
|
|
|
7035
8098
|
|
|
7036
8099
|
/**
|
|
7037
8100
|
* Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
8101
|
+
* @example
|
|
8102
|
+
* ```js
|
|
8103
|
+
* // Before running the sample:
|
|
8104
|
+
* // - Enable the API at:
|
|
8105
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
8106
|
+
* // - Login into gcloud by running:
|
|
8107
|
+
* // ```sh
|
|
8108
|
+
* // $ gcloud auth application-default login
|
|
8109
|
+
* // ```
|
|
8110
|
+
* // - Install the npm module by running:
|
|
8111
|
+
* // ```sh
|
|
8112
|
+
* // $ npm install googleapis
|
|
8113
|
+
* // ```
|
|
7038
8114
|
*
|
|
7039
|
-
*
|
|
7040
|
-
*
|
|
7041
|
-
*
|
|
7042
|
-
*
|
|
7043
|
-
|
|
7044
|
-
|
|
8115
|
+
* const {google} = require('googleapis');
|
|
8116
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
8117
|
+
*
|
|
8118
|
+
* async function main() {
|
|
8119
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8120
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8121
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8122
|
+
* });
|
|
8123
|
+
*
|
|
8124
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8125
|
+
* const authClient = await auth.getClient();
|
|
8126
|
+
* google.options({auth: authClient});
|
|
8127
|
+
*
|
|
8128
|
+
* // Do the magic
|
|
8129
|
+
* const res =
|
|
8130
|
+
* await securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate({
|
|
8131
|
+
* // Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
8132
|
+
* name: 'folders/my-folder/rapidVulnerabilityDetectionSettings',
|
|
8133
|
+
* });
|
|
8134
|
+
* console.log(res.data);
|
|
8135
|
+
*
|
|
8136
|
+
* // Example response
|
|
8137
|
+
* // {
|
|
8138
|
+
* // "modules": {},
|
|
8139
|
+
* // "name": "my_name",
|
|
8140
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
8141
|
+
* // "updateTime": "my_updateTime"
|
|
8142
|
+
* // }
|
|
8143
|
+
* }
|
|
8144
|
+
*
|
|
8145
|
+
* main().catch(e => {
|
|
8146
|
+
* console.error(e);
|
|
8147
|
+
* throw e;
|
|
8148
|
+
* });
|
|
8149
|
+
*
|
|
8150
|
+
* ```
|
|
8151
|
+
*
|
|
8152
|
+
* @param params - Parameters for request
|
|
8153
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8154
|
+
* @param callback - Optional callback that handles the response.
|
|
8155
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8156
|
+
*/
|
|
8157
|
+
calculate(
|
|
7045
8158
|
params: Params$Resource$Folders$Rapidvulnerabilitydetectionsettings$Calculate,
|
|
7046
8159
|
options: StreamMethodOptions
|
|
7047
8160
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
@@ -7153,6 +8266,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
7153
8266
|
|
|
7154
8267
|
/**
|
|
7155
8268
|
* Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
8269
|
+
* @example
|
|
8270
|
+
* ```js
|
|
8271
|
+
* // Before running the sample:
|
|
8272
|
+
* // - Enable the API at:
|
|
8273
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
8274
|
+
* // - Login into gcloud by running:
|
|
8275
|
+
* // ```sh
|
|
8276
|
+
* // $ gcloud auth application-default login
|
|
8277
|
+
* // ```
|
|
8278
|
+
* // - Install the npm module by running:
|
|
8279
|
+
* // ```sh
|
|
8280
|
+
* // $ npm install googleapis
|
|
8281
|
+
* // ```
|
|
8282
|
+
*
|
|
8283
|
+
* const {google} = require('googleapis');
|
|
8284
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
8285
|
+
*
|
|
8286
|
+
* async function main() {
|
|
8287
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8288
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8289
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8290
|
+
* });
|
|
8291
|
+
*
|
|
8292
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8293
|
+
* const authClient = await auth.getClient();
|
|
8294
|
+
* google.options({auth: authClient});
|
|
8295
|
+
*
|
|
8296
|
+
* // Do the magic
|
|
8297
|
+
* const res =
|
|
8298
|
+
* await securitycenter.folders.securityHealthAnalyticsSettings.calculate({
|
|
8299
|
+
* // Required. The name of the SecurityHealthAnalyticsSettings to calculate. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
8300
|
+
* name: 'folders/my-folder/securityHealthAnalyticsSettings',
|
|
8301
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
8302
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
8303
|
+
* });
|
|
8304
|
+
* console.log(res.data);
|
|
8305
|
+
*
|
|
8306
|
+
* // Example response
|
|
8307
|
+
* // {
|
|
8308
|
+
* // "modules": {},
|
|
8309
|
+
* // "name": "my_name",
|
|
8310
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
8311
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
8312
|
+
* // "updateTime": "my_updateTime"
|
|
8313
|
+
* // }
|
|
8314
|
+
* }
|
|
8315
|
+
*
|
|
8316
|
+
* main().catch(e => {
|
|
8317
|
+
* console.error(e);
|
|
8318
|
+
* throw e;
|
|
8319
|
+
* });
|
|
8320
|
+
*
|
|
8321
|
+
* ```
|
|
7156
8322
|
*
|
|
7157
8323
|
* @param params - Parameters for request
|
|
7158
8324
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7271,6 +8437,61 @@ export namespace securitycenter_v1beta2 {
|
|
|
7271
8437
|
|
|
7272
8438
|
/**
|
|
7273
8439
|
* Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
8440
|
+
* @example
|
|
8441
|
+
* ```js
|
|
8442
|
+
* // Before running the sample:
|
|
8443
|
+
* // - Enable the API at:
|
|
8444
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
8445
|
+
* // - Login into gcloud by running:
|
|
8446
|
+
* // ```sh
|
|
8447
|
+
* // $ gcloud auth application-default login
|
|
8448
|
+
* // ```
|
|
8449
|
+
* // - Install the npm module by running:
|
|
8450
|
+
* // ```sh
|
|
8451
|
+
* // $ npm install googleapis
|
|
8452
|
+
* // ```
|
|
8453
|
+
*
|
|
8454
|
+
* const {google} = require('googleapis');
|
|
8455
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
8456
|
+
*
|
|
8457
|
+
* async function main() {
|
|
8458
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8459
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8460
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8461
|
+
* });
|
|
8462
|
+
*
|
|
8463
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8464
|
+
* const authClient = await auth.getClient();
|
|
8465
|
+
* google.options({auth: authClient});
|
|
8466
|
+
*
|
|
8467
|
+
* // Do the magic
|
|
8468
|
+
* const res =
|
|
8469
|
+
* await securitycenter.folders.virtualMachineThreatDetectionSettings.calculate(
|
|
8470
|
+
* {
|
|
8471
|
+
* // Required. The name of the VirtualMachineThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
8472
|
+
* name: 'folders/my-folder/virtualMachineThreatDetectionSettings',
|
|
8473
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
8474
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
8475
|
+
* },
|
|
8476
|
+
* );
|
|
8477
|
+
* console.log(res.data);
|
|
8478
|
+
*
|
|
8479
|
+
* // Example response
|
|
8480
|
+
* // {
|
|
8481
|
+
* // "modules": {},
|
|
8482
|
+
* // "name": "my_name",
|
|
8483
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
8484
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
8485
|
+
* // "updateTime": "my_updateTime"
|
|
8486
|
+
* // }
|
|
8487
|
+
* }
|
|
8488
|
+
*
|
|
8489
|
+
* main().catch(e => {
|
|
8490
|
+
* console.error(e);
|
|
8491
|
+
* throw e;
|
|
8492
|
+
* });
|
|
8493
|
+
*
|
|
8494
|
+
* ```
|
|
7274
8495
|
*
|
|
7275
8496
|
* @param params - Parameters for request
|
|
7276
8497
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7393,6 +8614,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
7393
8614
|
|
|
7394
8615
|
/**
|
|
7395
8616
|
* Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
8617
|
+
* @example
|
|
8618
|
+
* ```js
|
|
8619
|
+
* // Before running the sample:
|
|
8620
|
+
* // - Enable the API at:
|
|
8621
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
8622
|
+
* // - Login into gcloud by running:
|
|
8623
|
+
* // ```sh
|
|
8624
|
+
* // $ gcloud auth application-default login
|
|
8625
|
+
* // ```
|
|
8626
|
+
* // - Install the npm module by running:
|
|
8627
|
+
* // ```sh
|
|
8628
|
+
* // $ npm install googleapis
|
|
8629
|
+
* // ```
|
|
8630
|
+
*
|
|
8631
|
+
* const {google} = require('googleapis');
|
|
8632
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
8633
|
+
*
|
|
8634
|
+
* async function main() {
|
|
8635
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8636
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8637
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8638
|
+
* });
|
|
8639
|
+
*
|
|
8640
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8641
|
+
* const authClient = await auth.getClient();
|
|
8642
|
+
* google.options({auth: authClient});
|
|
8643
|
+
*
|
|
8644
|
+
* // Do the magic
|
|
8645
|
+
* const res = await securitycenter.folders.webSecurityScannerSettings.calculate(
|
|
8646
|
+
* {
|
|
8647
|
+
* // Required. The name of the WebSecurityScannerSettings to calculate. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
8648
|
+
* name: 'folders/my-folder/webSecurityScannerSettings',
|
|
8649
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
8650
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
8651
|
+
* },
|
|
8652
|
+
* );
|
|
8653
|
+
* console.log(res.data);
|
|
8654
|
+
*
|
|
8655
|
+
* // Example response
|
|
8656
|
+
* // {
|
|
8657
|
+
* // "modules": {},
|
|
8658
|
+
* // "name": "my_name",
|
|
8659
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
8660
|
+
* // "updateTime": "my_updateTime"
|
|
8661
|
+
* // }
|
|
8662
|
+
* }
|
|
8663
|
+
*
|
|
8664
|
+
* main().catch(e => {
|
|
8665
|
+
* console.error(e);
|
|
8666
|
+
* throw e;
|
|
8667
|
+
* });
|
|
8668
|
+
*
|
|
8669
|
+
* ```
|
|
7396
8670
|
*
|
|
7397
8671
|
* @param params - Parameters for request
|
|
7398
8672
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7535,6 +8809,57 @@ export namespace securitycenter_v1beta2 {
|
|
|
7535
8809
|
|
|
7536
8810
|
/**
|
|
7537
8811
|
* Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.
|
|
8812
|
+
* @example
|
|
8813
|
+
* ```js
|
|
8814
|
+
* // Before running the sample:
|
|
8815
|
+
* // - Enable the API at:
|
|
8816
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
8817
|
+
* // - Login into gcloud by running:
|
|
8818
|
+
* // ```sh
|
|
8819
|
+
* // $ gcloud auth application-default login
|
|
8820
|
+
* // ```
|
|
8821
|
+
* // - Install the npm module by running:
|
|
8822
|
+
* // ```sh
|
|
8823
|
+
* // $ npm install googleapis
|
|
8824
|
+
* // ```
|
|
8825
|
+
*
|
|
8826
|
+
* const {google} = require('googleapis');
|
|
8827
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
8828
|
+
*
|
|
8829
|
+
* async function main() {
|
|
8830
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8831
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8832
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8833
|
+
* });
|
|
8834
|
+
*
|
|
8835
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8836
|
+
* const authClient = await auth.getClient();
|
|
8837
|
+
* google.options({auth: authClient});
|
|
8838
|
+
*
|
|
8839
|
+
* // Do the magic
|
|
8840
|
+
* const res =
|
|
8841
|
+
* await securitycenter.organizations.getContainerThreatDetectionSettings({
|
|
8842
|
+
* // Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
8843
|
+
* name: 'organizations/my-organization/containerThreatDetectionSettings',
|
|
8844
|
+
* });
|
|
8845
|
+
* console.log(res.data);
|
|
8846
|
+
*
|
|
8847
|
+
* // Example response
|
|
8848
|
+
* // {
|
|
8849
|
+
* // "modules": {},
|
|
8850
|
+
* // "name": "my_name",
|
|
8851
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
8852
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
8853
|
+
* // "updateTime": "my_updateTime"
|
|
8854
|
+
* // }
|
|
8855
|
+
* }
|
|
8856
|
+
*
|
|
8857
|
+
* main().catch(e => {
|
|
8858
|
+
* console.error(e);
|
|
8859
|
+
* throw e;
|
|
8860
|
+
* });
|
|
8861
|
+
*
|
|
8862
|
+
* ```
|
|
7538
8863
|
*
|
|
7539
8864
|
* @param params - Parameters for request
|
|
7540
8865
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7635,6 +8960,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
7635
8960
|
|
|
7636
8961
|
/**
|
|
7637
8962
|
* Get the EventThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetEventThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateEventThreatDetectionSettings for this purpose.
|
|
8963
|
+
* @example
|
|
8964
|
+
* ```js
|
|
8965
|
+
* // Before running the sample:
|
|
8966
|
+
* // - Enable the API at:
|
|
8967
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
8968
|
+
* // - Login into gcloud by running:
|
|
8969
|
+
* // ```sh
|
|
8970
|
+
* // $ gcloud auth application-default login
|
|
8971
|
+
* // ```
|
|
8972
|
+
* // - Install the npm module by running:
|
|
8973
|
+
* // ```sh
|
|
8974
|
+
* // $ npm install googleapis
|
|
8975
|
+
* // ```
|
|
8976
|
+
*
|
|
8977
|
+
* const {google} = require('googleapis');
|
|
8978
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
8979
|
+
*
|
|
8980
|
+
* async function main() {
|
|
8981
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8982
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8983
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8984
|
+
* });
|
|
8985
|
+
*
|
|
8986
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8987
|
+
* const authClient = await auth.getClient();
|
|
8988
|
+
* google.options({auth: authClient});
|
|
8989
|
+
*
|
|
8990
|
+
* // Do the magic
|
|
8991
|
+
* const res =
|
|
8992
|
+
* await securitycenter.organizations.getEventThreatDetectionSettings({
|
|
8993
|
+
* // Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
8994
|
+
* name: 'organizations/my-organization/eventThreatDetectionSettings',
|
|
8995
|
+
* });
|
|
8996
|
+
* console.log(res.data);
|
|
8997
|
+
*
|
|
8998
|
+
* // Example response
|
|
8999
|
+
* // {
|
|
9000
|
+
* // "modules": {},
|
|
9001
|
+
* // "name": "my_name",
|
|
9002
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
9003
|
+
* // "updateTime": "my_updateTime"
|
|
9004
|
+
* // }
|
|
9005
|
+
* }
|
|
9006
|
+
*
|
|
9007
|
+
* main().catch(e => {
|
|
9008
|
+
* console.error(e);
|
|
9009
|
+
* throw e;
|
|
9010
|
+
* });
|
|
9011
|
+
*
|
|
9012
|
+
* ```
|
|
7638
9013
|
*
|
|
7639
9014
|
* @param params - Parameters for request
|
|
7640
9015
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7731,6 +9106,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
7731
9106
|
|
|
7732
9107
|
/**
|
|
7733
9108
|
* Get the RapidVulnerabilityDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetRapidVulnerabilityDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this purpose.
|
|
9109
|
+
* @example
|
|
9110
|
+
* ```js
|
|
9111
|
+
* // Before running the sample:
|
|
9112
|
+
* // - Enable the API at:
|
|
9113
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9114
|
+
* // - Login into gcloud by running:
|
|
9115
|
+
* // ```sh
|
|
9116
|
+
* // $ gcloud auth application-default login
|
|
9117
|
+
* // ```
|
|
9118
|
+
* // - Install the npm module by running:
|
|
9119
|
+
* // ```sh
|
|
9120
|
+
* // $ npm install googleapis
|
|
9121
|
+
* // ```
|
|
9122
|
+
*
|
|
9123
|
+
* const {google} = require('googleapis');
|
|
9124
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9125
|
+
*
|
|
9126
|
+
* async function main() {
|
|
9127
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9128
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9129
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9130
|
+
* });
|
|
9131
|
+
*
|
|
9132
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9133
|
+
* const authClient = await auth.getClient();
|
|
9134
|
+
* google.options({auth: authClient});
|
|
9135
|
+
*
|
|
9136
|
+
* // Do the magic
|
|
9137
|
+
* const res =
|
|
9138
|
+
* await securitycenter.organizations.getRapidVulnerabilityDetectionSettings({
|
|
9139
|
+
* // Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
9140
|
+
* name: 'organizations/my-organization/rapidVulnerabilityDetectionSettings',
|
|
9141
|
+
* });
|
|
9142
|
+
* console.log(res.data);
|
|
9143
|
+
*
|
|
9144
|
+
* // Example response
|
|
9145
|
+
* // {
|
|
9146
|
+
* // "modules": {},
|
|
9147
|
+
* // "name": "my_name",
|
|
9148
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
9149
|
+
* // "updateTime": "my_updateTime"
|
|
9150
|
+
* // }
|
|
9151
|
+
* }
|
|
9152
|
+
*
|
|
9153
|
+
* main().catch(e => {
|
|
9154
|
+
* console.error(e);
|
|
9155
|
+
* throw e;
|
|
9156
|
+
* });
|
|
9157
|
+
*
|
|
9158
|
+
* ```
|
|
7734
9159
|
*
|
|
7735
9160
|
* @param params - Parameters for request
|
|
7736
9161
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7831,6 +9256,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
7831
9256
|
|
|
7832
9257
|
/**
|
|
7833
9258
|
* Get the SecurityCenterSettings resource.
|
|
9259
|
+
* @example
|
|
9260
|
+
* ```js
|
|
9261
|
+
* // Before running the sample:
|
|
9262
|
+
* // - Enable the API at:
|
|
9263
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9264
|
+
* // - Login into gcloud by running:
|
|
9265
|
+
* // ```sh
|
|
9266
|
+
* // $ gcloud auth application-default login
|
|
9267
|
+
* // ```
|
|
9268
|
+
* // - Install the npm module by running:
|
|
9269
|
+
* // ```sh
|
|
9270
|
+
* // $ npm install googleapis
|
|
9271
|
+
* // ```
|
|
9272
|
+
*
|
|
9273
|
+
* const {google} = require('googleapis');
|
|
9274
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9275
|
+
*
|
|
9276
|
+
* async function main() {
|
|
9277
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9278
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9279
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9280
|
+
* });
|
|
9281
|
+
*
|
|
9282
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9283
|
+
* const authClient = await auth.getClient();
|
|
9284
|
+
* google.options({auth: authClient});
|
|
9285
|
+
*
|
|
9286
|
+
* // Do the magic
|
|
9287
|
+
* const res = await securitycenter.organizations.getSecurityCenterSettings({
|
|
9288
|
+
* // Required. The name of the SecurityCenterSettings to retrieve. Format: organizations/{organization\}/securityCenterSettings Format: folders/{folder\}/securityCenterSettings Format: projects/{project\}/securityCenterSettings
|
|
9289
|
+
* name: 'organizations/my-organization/securityCenterSettings',
|
|
9290
|
+
* });
|
|
9291
|
+
* console.log(res.data);
|
|
9292
|
+
*
|
|
9293
|
+
* // Example response
|
|
9294
|
+
* // {
|
|
9295
|
+
* // "logSinkProject": "my_logSinkProject",
|
|
9296
|
+
* // "name": "my_name",
|
|
9297
|
+
* // "onboardingTime": "my_onboardingTime",
|
|
9298
|
+
* // "orgServiceAccount": "my_orgServiceAccount"
|
|
9299
|
+
* // }
|
|
9300
|
+
* }
|
|
9301
|
+
*
|
|
9302
|
+
* main().catch(e => {
|
|
9303
|
+
* console.error(e);
|
|
9304
|
+
* throw e;
|
|
9305
|
+
* });
|
|
9306
|
+
*
|
|
9307
|
+
* ```
|
|
7834
9308
|
*
|
|
7835
9309
|
* @param params - Parameters for request
|
|
7836
9310
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7924,6 +9398,57 @@ export namespace securitycenter_v1beta2 {
|
|
|
7924
9398
|
|
|
7925
9399
|
/**
|
|
7926
9400
|
* Get the SecurityHealthAnalyticsSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetSecurityHealthAnalyticsSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateSecurityHealthAnalyticsSettings for this purpose.
|
|
9401
|
+
* @example
|
|
9402
|
+
* ```js
|
|
9403
|
+
* // Before running the sample:
|
|
9404
|
+
* // - Enable the API at:
|
|
9405
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9406
|
+
* // - Login into gcloud by running:
|
|
9407
|
+
* // ```sh
|
|
9408
|
+
* // $ gcloud auth application-default login
|
|
9409
|
+
* // ```
|
|
9410
|
+
* // - Install the npm module by running:
|
|
9411
|
+
* // ```sh
|
|
9412
|
+
* // $ npm install googleapis
|
|
9413
|
+
* // ```
|
|
9414
|
+
*
|
|
9415
|
+
* const {google} = require('googleapis');
|
|
9416
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9417
|
+
*
|
|
9418
|
+
* async function main() {
|
|
9419
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9420
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9421
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9422
|
+
* });
|
|
9423
|
+
*
|
|
9424
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9425
|
+
* const authClient = await auth.getClient();
|
|
9426
|
+
* google.options({auth: authClient});
|
|
9427
|
+
*
|
|
9428
|
+
* // Do the magic
|
|
9429
|
+
* const res =
|
|
9430
|
+
* await securitycenter.organizations.getSecurityHealthAnalyticsSettings({
|
|
9431
|
+
* // Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
9432
|
+
* name: 'organizations/my-organization/securityHealthAnalyticsSettings',
|
|
9433
|
+
* });
|
|
9434
|
+
* console.log(res.data);
|
|
9435
|
+
*
|
|
9436
|
+
* // Example response
|
|
9437
|
+
* // {
|
|
9438
|
+
* // "modules": {},
|
|
9439
|
+
* // "name": "my_name",
|
|
9440
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
9441
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
9442
|
+
* // "updateTime": "my_updateTime"
|
|
9443
|
+
* // }
|
|
9444
|
+
* }
|
|
9445
|
+
*
|
|
9446
|
+
* main().catch(e => {
|
|
9447
|
+
* console.error(e);
|
|
9448
|
+
* throw e;
|
|
9449
|
+
* });
|
|
9450
|
+
*
|
|
9451
|
+
* ```
|
|
7927
9452
|
*
|
|
7928
9453
|
* @param params - Parameters for request
|
|
7929
9454
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8020,6 +9545,54 @@ export namespace securitycenter_v1beta2 {
|
|
|
8020
9545
|
|
|
8021
9546
|
/**
|
|
8022
9547
|
* Get the Subscription resource.
|
|
9548
|
+
* @example
|
|
9549
|
+
* ```js
|
|
9550
|
+
* // Before running the sample:
|
|
9551
|
+
* // - Enable the API at:
|
|
9552
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9553
|
+
* // - Login into gcloud by running:
|
|
9554
|
+
* // ```sh
|
|
9555
|
+
* // $ gcloud auth application-default login
|
|
9556
|
+
* // ```
|
|
9557
|
+
* // - Install the npm module by running:
|
|
9558
|
+
* // ```sh
|
|
9559
|
+
* // $ npm install googleapis
|
|
9560
|
+
* // ```
|
|
9561
|
+
*
|
|
9562
|
+
* const {google} = require('googleapis');
|
|
9563
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9564
|
+
*
|
|
9565
|
+
* async function main() {
|
|
9566
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9567
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9568
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9569
|
+
* });
|
|
9570
|
+
*
|
|
9571
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9572
|
+
* const authClient = await auth.getClient();
|
|
9573
|
+
* google.options({auth: authClient});
|
|
9574
|
+
*
|
|
9575
|
+
* // Do the magic
|
|
9576
|
+
* const res = await securitycenter.organizations.getSubscription({
|
|
9577
|
+
* // Required. The name of the subscription to retrieve. Format: organizations/{organization\}/subscription
|
|
9578
|
+
* name: 'organizations/my-organization/subscription',
|
|
9579
|
+
* });
|
|
9580
|
+
* console.log(res.data);
|
|
9581
|
+
*
|
|
9582
|
+
* // Example response
|
|
9583
|
+
* // {
|
|
9584
|
+
* // "details": {},
|
|
9585
|
+
* // "name": "my_name",
|
|
9586
|
+
* // "tier": "my_tier"
|
|
9587
|
+
* // }
|
|
9588
|
+
* }
|
|
9589
|
+
*
|
|
9590
|
+
* main().catch(e => {
|
|
9591
|
+
* console.error(e);
|
|
9592
|
+
* throw e;
|
|
9593
|
+
* });
|
|
9594
|
+
*
|
|
9595
|
+
* ```
|
|
8023
9596
|
*
|
|
8024
9597
|
* @param params - Parameters for request
|
|
8025
9598
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8109,6 +9682,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
8109
9682
|
|
|
8110
9683
|
/**
|
|
8111
9684
|
* Get the VirtualMachineThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetVirtualMachineThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for this purpose.
|
|
9685
|
+
* @example
|
|
9686
|
+
* ```js
|
|
9687
|
+
* // Before running the sample:
|
|
9688
|
+
* // - Enable the API at:
|
|
9689
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9690
|
+
* // - Login into gcloud by running:
|
|
9691
|
+
* // ```sh
|
|
9692
|
+
* // $ gcloud auth application-default login
|
|
9693
|
+
* // ```
|
|
9694
|
+
* // - Install the npm module by running:
|
|
9695
|
+
* // ```sh
|
|
9696
|
+
* // $ npm install googleapis
|
|
9697
|
+
* // ```
|
|
9698
|
+
*
|
|
9699
|
+
* const {google} = require('googleapis');
|
|
9700
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9701
|
+
*
|
|
9702
|
+
* async function main() {
|
|
9703
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9704
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9705
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9706
|
+
* });
|
|
9707
|
+
*
|
|
9708
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9709
|
+
* const authClient = await auth.getClient();
|
|
9710
|
+
* google.options({auth: authClient});
|
|
9711
|
+
*
|
|
9712
|
+
* // Do the magic
|
|
9713
|
+
* const res =
|
|
9714
|
+
* await securitycenter.organizations.getVirtualMachineThreatDetectionSettings(
|
|
9715
|
+
* {
|
|
9716
|
+
* // Required. The name of the VirtualMachineThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
9717
|
+
* name: 'organizations/my-organization/virtualMachineThreatDetectionSettings',
|
|
9718
|
+
* },
|
|
9719
|
+
* );
|
|
9720
|
+
* console.log(res.data);
|
|
9721
|
+
*
|
|
9722
|
+
* // Example response
|
|
9723
|
+
* // {
|
|
9724
|
+
* // "modules": {},
|
|
9725
|
+
* // "name": "my_name",
|
|
9726
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
9727
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
9728
|
+
* // "updateTime": "my_updateTime"
|
|
9729
|
+
* // }
|
|
9730
|
+
* }
|
|
9731
|
+
*
|
|
9732
|
+
* main().catch(e => {
|
|
9733
|
+
* console.error(e);
|
|
9734
|
+
* throw e;
|
|
9735
|
+
* });
|
|
9736
|
+
*
|
|
9737
|
+
* ```
|
|
8112
9738
|
*
|
|
8113
9739
|
* @param params - Parameters for request
|
|
8114
9740
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8209,6 +9835,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
8209
9835
|
|
|
8210
9836
|
/**
|
|
8211
9837
|
* Get the WebSecurityScannerSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetWebSecurityScannerSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateWebSecurityScannerSettings for this purpose.
|
|
9838
|
+
* @example
|
|
9839
|
+
* ```js
|
|
9840
|
+
* // Before running the sample:
|
|
9841
|
+
* // - Enable the API at:
|
|
9842
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9843
|
+
* // - Login into gcloud by running:
|
|
9844
|
+
* // ```sh
|
|
9845
|
+
* // $ gcloud auth application-default login
|
|
9846
|
+
* // ```
|
|
9847
|
+
* // - Install the npm module by running:
|
|
9848
|
+
* // ```sh
|
|
9849
|
+
* // $ npm install googleapis
|
|
9850
|
+
* // ```
|
|
9851
|
+
*
|
|
9852
|
+
* const {google} = require('googleapis');
|
|
9853
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9854
|
+
*
|
|
9855
|
+
* async function main() {
|
|
9856
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9857
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9858
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9859
|
+
* });
|
|
9860
|
+
*
|
|
9861
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9862
|
+
* const authClient = await auth.getClient();
|
|
9863
|
+
* google.options({auth: authClient});
|
|
9864
|
+
*
|
|
9865
|
+
* // Do the magic
|
|
9866
|
+
* const res = await securitycenter.organizations.getWebSecurityScannerSettings({
|
|
9867
|
+
* // Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
9868
|
+
* name: 'organizations/my-organization/webSecurityScannerSettings',
|
|
9869
|
+
* });
|
|
9870
|
+
* console.log(res.data);
|
|
9871
|
+
*
|
|
9872
|
+
* // Example response
|
|
9873
|
+
* // {
|
|
9874
|
+
* // "modules": {},
|
|
9875
|
+
* // "name": "my_name",
|
|
9876
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
9877
|
+
* // "updateTime": "my_updateTime"
|
|
9878
|
+
* // }
|
|
9879
|
+
* }
|
|
9880
|
+
*
|
|
9881
|
+
* main().catch(e => {
|
|
9882
|
+
* console.error(e);
|
|
9883
|
+
* throw e;
|
|
9884
|
+
* });
|
|
9885
|
+
*
|
|
9886
|
+
* ```
|
|
8212
9887
|
*
|
|
8213
9888
|
* @param params - Parameters for request
|
|
8214
9889
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8303,6 +9978,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
8303
9978
|
|
|
8304
9979
|
/**
|
|
8305
9980
|
* Update the ContainerThreatDetectionSettings resource.
|
|
9981
|
+
* @example
|
|
9982
|
+
* ```js
|
|
9983
|
+
* // Before running the sample:
|
|
9984
|
+
* // - Enable the API at:
|
|
9985
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
9986
|
+
* // - Login into gcloud by running:
|
|
9987
|
+
* // ```sh
|
|
9988
|
+
* // $ gcloud auth application-default login
|
|
9989
|
+
* // ```
|
|
9990
|
+
* // - Install the npm module by running:
|
|
9991
|
+
* // ```sh
|
|
9992
|
+
* // $ npm install googleapis
|
|
9993
|
+
* // ```
|
|
9994
|
+
*
|
|
9995
|
+
* const {google} = require('googleapis');
|
|
9996
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
9997
|
+
*
|
|
9998
|
+
* async function main() {
|
|
9999
|
+
* const auth = new google.auth.GoogleAuth({
|
|
10000
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10001
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
10002
|
+
* });
|
|
10003
|
+
*
|
|
10004
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
10005
|
+
* const authClient = await auth.getClient();
|
|
10006
|
+
* google.options({auth: authClient});
|
|
10007
|
+
*
|
|
10008
|
+
* // Do the magic
|
|
10009
|
+
* const res =
|
|
10010
|
+
* await securitycenter.organizations.updateContainerThreatDetectionSettings({
|
|
10011
|
+
* // Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
10012
|
+
* name: 'organizations/my-organization/containerThreatDetectionSettings',
|
|
10013
|
+
* // The list of fields to be updated.
|
|
10014
|
+
* updateMask: 'placeholder-value',
|
|
10015
|
+
*
|
|
10016
|
+
* // Request body metadata
|
|
10017
|
+
* requestBody: {
|
|
10018
|
+
* // request body parameters
|
|
10019
|
+
* // {
|
|
10020
|
+
* // "modules": {},
|
|
10021
|
+
* // "name": "my_name",
|
|
10022
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
10023
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10024
|
+
* // "updateTime": "my_updateTime"
|
|
10025
|
+
* // }
|
|
10026
|
+
* },
|
|
10027
|
+
* });
|
|
10028
|
+
* console.log(res.data);
|
|
10029
|
+
*
|
|
10030
|
+
* // Example response
|
|
10031
|
+
* // {
|
|
10032
|
+
* // "modules": {},
|
|
10033
|
+
* // "name": "my_name",
|
|
10034
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
10035
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10036
|
+
* // "updateTime": "my_updateTime"
|
|
10037
|
+
* // }
|
|
10038
|
+
* }
|
|
10039
|
+
*
|
|
10040
|
+
* main().catch(e => {
|
|
10041
|
+
* console.error(e);
|
|
10042
|
+
* throw e;
|
|
10043
|
+
* });
|
|
10044
|
+
*
|
|
10045
|
+
* ```
|
|
8306
10046
|
*
|
|
8307
10047
|
* @param params - Parameters for request
|
|
8308
10048
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8403,6 +10143,69 @@ export namespace securitycenter_v1beta2 {
|
|
|
8403
10143
|
|
|
8404
10144
|
/**
|
|
8405
10145
|
* Update the EventThreatDetectionSettings resource.
|
|
10146
|
+
* @example
|
|
10147
|
+
* ```js
|
|
10148
|
+
* // Before running the sample:
|
|
10149
|
+
* // - Enable the API at:
|
|
10150
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
10151
|
+
* // - Login into gcloud by running:
|
|
10152
|
+
* // ```sh
|
|
10153
|
+
* // $ gcloud auth application-default login
|
|
10154
|
+
* // ```
|
|
10155
|
+
* // - Install the npm module by running:
|
|
10156
|
+
* // ```sh
|
|
10157
|
+
* // $ npm install googleapis
|
|
10158
|
+
* // ```
|
|
10159
|
+
*
|
|
10160
|
+
* const {google} = require('googleapis');
|
|
10161
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
10162
|
+
*
|
|
10163
|
+
* async function main() {
|
|
10164
|
+
* const auth = new google.auth.GoogleAuth({
|
|
10165
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10166
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
10167
|
+
* });
|
|
10168
|
+
*
|
|
10169
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
10170
|
+
* const authClient = await auth.getClient();
|
|
10171
|
+
* google.options({auth: authClient});
|
|
10172
|
+
*
|
|
10173
|
+
* // Do the magic
|
|
10174
|
+
* const res =
|
|
10175
|
+
* await securitycenter.organizations.updateEventThreatDetectionSettings({
|
|
10176
|
+
* // Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
10177
|
+
* name: 'organizations/my-organization/eventThreatDetectionSettings',
|
|
10178
|
+
* // The list of fields to be updated.
|
|
10179
|
+
* updateMask: 'placeholder-value',
|
|
10180
|
+
*
|
|
10181
|
+
* // Request body metadata
|
|
10182
|
+
* requestBody: {
|
|
10183
|
+
* // request body parameters
|
|
10184
|
+
* // {
|
|
10185
|
+
* // "modules": {},
|
|
10186
|
+
* // "name": "my_name",
|
|
10187
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10188
|
+
* // "updateTime": "my_updateTime"
|
|
10189
|
+
* // }
|
|
10190
|
+
* },
|
|
10191
|
+
* });
|
|
10192
|
+
* console.log(res.data);
|
|
10193
|
+
*
|
|
10194
|
+
* // Example response
|
|
10195
|
+
* // {
|
|
10196
|
+
* // "modules": {},
|
|
10197
|
+
* // "name": "my_name",
|
|
10198
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10199
|
+
* // "updateTime": "my_updateTime"
|
|
10200
|
+
* // }
|
|
10201
|
+
* }
|
|
10202
|
+
*
|
|
10203
|
+
* main().catch(e => {
|
|
10204
|
+
* console.error(e);
|
|
10205
|
+
* throw e;
|
|
10206
|
+
* });
|
|
10207
|
+
*
|
|
10208
|
+
* ```
|
|
8406
10209
|
*
|
|
8407
10210
|
* @param params - Parameters for request
|
|
8408
10211
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8499,6 +10302,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
8499
10302
|
|
|
8500
10303
|
/**
|
|
8501
10304
|
* Update the RapidVulnerabilityDetectionSettings resource.
|
|
10305
|
+
* @example
|
|
10306
|
+
* ```js
|
|
10307
|
+
* // Before running the sample:
|
|
10308
|
+
* // - Enable the API at:
|
|
10309
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
10310
|
+
* // - Login into gcloud by running:
|
|
10311
|
+
* // ```sh
|
|
10312
|
+
* // $ gcloud auth application-default login
|
|
10313
|
+
* // ```
|
|
10314
|
+
* // - Install the npm module by running:
|
|
10315
|
+
* // ```sh
|
|
10316
|
+
* // $ npm install googleapis
|
|
10317
|
+
* // ```
|
|
10318
|
+
*
|
|
10319
|
+
* const {google} = require('googleapis');
|
|
10320
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
10321
|
+
*
|
|
10322
|
+
* async function main() {
|
|
10323
|
+
* const auth = new google.auth.GoogleAuth({
|
|
10324
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10325
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
10326
|
+
* });
|
|
10327
|
+
*
|
|
10328
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
10329
|
+
* const authClient = await auth.getClient();
|
|
10330
|
+
* google.options({auth: authClient});
|
|
10331
|
+
*
|
|
10332
|
+
* // Do the magic
|
|
10333
|
+
* const res =
|
|
10334
|
+
* await securitycenter.organizations.updateRapidVulnerabilityDetectionSettings(
|
|
10335
|
+
* {
|
|
10336
|
+
* // The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
10337
|
+
* name: 'organizations/my-organization/rapidVulnerabilityDetectionSettings',
|
|
10338
|
+
* // The list of fields to be updated.
|
|
10339
|
+
* updateMask: 'placeholder-value',
|
|
10340
|
+
*
|
|
10341
|
+
* // Request body metadata
|
|
10342
|
+
* requestBody: {
|
|
10343
|
+
* // request body parameters
|
|
10344
|
+
* // {
|
|
10345
|
+
* // "modules": {},
|
|
10346
|
+
* // "name": "my_name",
|
|
10347
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10348
|
+
* // "updateTime": "my_updateTime"
|
|
10349
|
+
* // }
|
|
10350
|
+
* },
|
|
10351
|
+
* },
|
|
10352
|
+
* );
|
|
10353
|
+
* console.log(res.data);
|
|
10354
|
+
*
|
|
10355
|
+
* // Example response
|
|
10356
|
+
* // {
|
|
10357
|
+
* // "modules": {},
|
|
10358
|
+
* // "name": "my_name",
|
|
10359
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10360
|
+
* // "updateTime": "my_updateTime"
|
|
10361
|
+
* // }
|
|
10362
|
+
* }
|
|
10363
|
+
*
|
|
10364
|
+
* main().catch(e => {
|
|
10365
|
+
* console.error(e);
|
|
10366
|
+
* throw e;
|
|
10367
|
+
* });
|
|
10368
|
+
*
|
|
10369
|
+
* ```
|
|
8502
10370
|
*
|
|
8503
10371
|
* @param params - Parameters for request
|
|
8504
10372
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8599,6 +10467,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
8599
10467
|
|
|
8600
10468
|
/**
|
|
8601
10469
|
* Update the SecurityHealthAnalyticsSettings resource.
|
|
10470
|
+
* @example
|
|
10471
|
+
* ```js
|
|
10472
|
+
* // Before running the sample:
|
|
10473
|
+
* // - Enable the API at:
|
|
10474
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
10475
|
+
* // - Login into gcloud by running:
|
|
10476
|
+
* // ```sh
|
|
10477
|
+
* // $ gcloud auth application-default login
|
|
10478
|
+
* // ```
|
|
10479
|
+
* // - Install the npm module by running:
|
|
10480
|
+
* // ```sh
|
|
10481
|
+
* // $ npm install googleapis
|
|
10482
|
+
* // ```
|
|
10483
|
+
*
|
|
10484
|
+
* const {google} = require('googleapis');
|
|
10485
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
10486
|
+
*
|
|
10487
|
+
* async function main() {
|
|
10488
|
+
* const auth = new google.auth.GoogleAuth({
|
|
10489
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10490
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
10491
|
+
* });
|
|
10492
|
+
*
|
|
10493
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
10494
|
+
* const authClient = await auth.getClient();
|
|
10495
|
+
* google.options({auth: authClient});
|
|
10496
|
+
*
|
|
10497
|
+
* // Do the magic
|
|
10498
|
+
* const res =
|
|
10499
|
+
* await securitycenter.organizations.updateSecurityHealthAnalyticsSettings({
|
|
10500
|
+
* // Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
10501
|
+
* name: 'organizations/my-organization/securityHealthAnalyticsSettings',
|
|
10502
|
+
* // The list of fields to be updated.
|
|
10503
|
+
* updateMask: 'placeholder-value',
|
|
10504
|
+
*
|
|
10505
|
+
* // Request body metadata
|
|
10506
|
+
* requestBody: {
|
|
10507
|
+
* // request body parameters
|
|
10508
|
+
* // {
|
|
10509
|
+
* // "modules": {},
|
|
10510
|
+
* // "name": "my_name",
|
|
10511
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
10512
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10513
|
+
* // "updateTime": "my_updateTime"
|
|
10514
|
+
* // }
|
|
10515
|
+
* },
|
|
10516
|
+
* });
|
|
10517
|
+
* console.log(res.data);
|
|
10518
|
+
*
|
|
10519
|
+
* // Example response
|
|
10520
|
+
* // {
|
|
10521
|
+
* // "modules": {},
|
|
10522
|
+
* // "name": "my_name",
|
|
10523
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
10524
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10525
|
+
* // "updateTime": "my_updateTime"
|
|
10526
|
+
* // }
|
|
10527
|
+
* }
|
|
10528
|
+
*
|
|
10529
|
+
* main().catch(e => {
|
|
10530
|
+
* console.error(e);
|
|
10531
|
+
* throw e;
|
|
10532
|
+
* });
|
|
10533
|
+
*
|
|
10534
|
+
* ```
|
|
8602
10535
|
*
|
|
8603
10536
|
* @param params - Parameters for request
|
|
8604
10537
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8695,6 +10628,73 @@ export namespace securitycenter_v1beta2 {
|
|
|
8695
10628
|
|
|
8696
10629
|
/**
|
|
8697
10630
|
* Update the VirtualMachineThreatDetectionSettings resource.
|
|
10631
|
+
* @example
|
|
10632
|
+
* ```js
|
|
10633
|
+
* // Before running the sample:
|
|
10634
|
+
* // - Enable the API at:
|
|
10635
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
10636
|
+
* // - Login into gcloud by running:
|
|
10637
|
+
* // ```sh
|
|
10638
|
+
* // $ gcloud auth application-default login
|
|
10639
|
+
* // ```
|
|
10640
|
+
* // - Install the npm module by running:
|
|
10641
|
+
* // ```sh
|
|
10642
|
+
* // $ npm install googleapis
|
|
10643
|
+
* // ```
|
|
10644
|
+
*
|
|
10645
|
+
* const {google} = require('googleapis');
|
|
10646
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
10647
|
+
*
|
|
10648
|
+
* async function main() {
|
|
10649
|
+
* const auth = new google.auth.GoogleAuth({
|
|
10650
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10651
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
10652
|
+
* });
|
|
10653
|
+
*
|
|
10654
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
10655
|
+
* const authClient = await auth.getClient();
|
|
10656
|
+
* google.options({auth: authClient});
|
|
10657
|
+
*
|
|
10658
|
+
* // Do the magic
|
|
10659
|
+
* const res =
|
|
10660
|
+
* await securitycenter.organizations.updateVirtualMachineThreatDetectionSettings(
|
|
10661
|
+
* {
|
|
10662
|
+
* // Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
10663
|
+
* name: 'organizations/my-organization/virtualMachineThreatDetectionSettings',
|
|
10664
|
+
* // The list of fields to be updated.
|
|
10665
|
+
* updateMask: 'placeholder-value',
|
|
10666
|
+
*
|
|
10667
|
+
* // Request body metadata
|
|
10668
|
+
* requestBody: {
|
|
10669
|
+
* // request body parameters
|
|
10670
|
+
* // {
|
|
10671
|
+
* // "modules": {},
|
|
10672
|
+
* // "name": "my_name",
|
|
10673
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
10674
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10675
|
+
* // "updateTime": "my_updateTime"
|
|
10676
|
+
* // }
|
|
10677
|
+
* },
|
|
10678
|
+
* },
|
|
10679
|
+
* );
|
|
10680
|
+
* console.log(res.data);
|
|
10681
|
+
*
|
|
10682
|
+
* // Example response
|
|
10683
|
+
* // {
|
|
10684
|
+
* // "modules": {},
|
|
10685
|
+
* // "name": "my_name",
|
|
10686
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
10687
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10688
|
+
* // "updateTime": "my_updateTime"
|
|
10689
|
+
* // }
|
|
10690
|
+
* }
|
|
10691
|
+
*
|
|
10692
|
+
* main().catch(e => {
|
|
10693
|
+
* console.error(e);
|
|
10694
|
+
* throw e;
|
|
10695
|
+
* });
|
|
10696
|
+
*
|
|
10697
|
+
* ```
|
|
8698
10698
|
*
|
|
8699
10699
|
* @param params - Parameters for request
|
|
8700
10700
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8795,6 +10795,69 @@ export namespace securitycenter_v1beta2 {
|
|
|
8795
10795
|
|
|
8796
10796
|
/**
|
|
8797
10797
|
* Update the WebSecurityScannerSettings resource.
|
|
10798
|
+
* @example
|
|
10799
|
+
* ```js
|
|
10800
|
+
* // Before running the sample:
|
|
10801
|
+
* // - Enable the API at:
|
|
10802
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
10803
|
+
* // - Login into gcloud by running:
|
|
10804
|
+
* // ```sh
|
|
10805
|
+
* // $ gcloud auth application-default login
|
|
10806
|
+
* // ```
|
|
10807
|
+
* // - Install the npm module by running:
|
|
10808
|
+
* // ```sh
|
|
10809
|
+
* // $ npm install googleapis
|
|
10810
|
+
* // ```
|
|
10811
|
+
*
|
|
10812
|
+
* const {google} = require('googleapis');
|
|
10813
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
10814
|
+
*
|
|
10815
|
+
* async function main() {
|
|
10816
|
+
* const auth = new google.auth.GoogleAuth({
|
|
10817
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10818
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
10819
|
+
* });
|
|
10820
|
+
*
|
|
10821
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
10822
|
+
* const authClient = await auth.getClient();
|
|
10823
|
+
* google.options({auth: authClient});
|
|
10824
|
+
*
|
|
10825
|
+
* // Do the magic
|
|
10826
|
+
* const res =
|
|
10827
|
+
* await securitycenter.organizations.updateWebSecurityScannerSettings({
|
|
10828
|
+
* // Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
10829
|
+
* name: 'organizations/my-organization/webSecurityScannerSettings',
|
|
10830
|
+
* // The list of fields to be updated.
|
|
10831
|
+
* updateMask: 'placeholder-value',
|
|
10832
|
+
*
|
|
10833
|
+
* // Request body metadata
|
|
10834
|
+
* requestBody: {
|
|
10835
|
+
* // request body parameters
|
|
10836
|
+
* // {
|
|
10837
|
+
* // "modules": {},
|
|
10838
|
+
* // "name": "my_name",
|
|
10839
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10840
|
+
* // "updateTime": "my_updateTime"
|
|
10841
|
+
* // }
|
|
10842
|
+
* },
|
|
10843
|
+
* });
|
|
10844
|
+
* console.log(res.data);
|
|
10845
|
+
*
|
|
10846
|
+
* // Example response
|
|
10847
|
+
* // {
|
|
10848
|
+
* // "modules": {},
|
|
10849
|
+
* // "name": "my_name",
|
|
10850
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
10851
|
+
* // "updateTime": "my_updateTime"
|
|
10852
|
+
* // }
|
|
10853
|
+
* }
|
|
10854
|
+
*
|
|
10855
|
+
* main().catch(e => {
|
|
10856
|
+
* console.error(e);
|
|
10857
|
+
* throw e;
|
|
10858
|
+
* });
|
|
10859
|
+
*
|
|
10860
|
+
* ```
|
|
8798
10861
|
*
|
|
8799
10862
|
* @param params - Parameters for request
|
|
8800
10863
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9049,6 +11112,61 @@ export namespace securitycenter_v1beta2 {
|
|
|
9049
11112
|
|
|
9050
11113
|
/**
|
|
9051
11114
|
* Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
11115
|
+
* @example
|
|
11116
|
+
* ```js
|
|
11117
|
+
* // Before running the sample:
|
|
11118
|
+
* // - Enable the API at:
|
|
11119
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
11120
|
+
* // - Login into gcloud by running:
|
|
11121
|
+
* // ```sh
|
|
11122
|
+
* // $ gcloud auth application-default login
|
|
11123
|
+
* // ```
|
|
11124
|
+
* // - Install the npm module by running:
|
|
11125
|
+
* // ```sh
|
|
11126
|
+
* // $ npm install googleapis
|
|
11127
|
+
* // ```
|
|
11128
|
+
*
|
|
11129
|
+
* const {google} = require('googleapis');
|
|
11130
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
11131
|
+
*
|
|
11132
|
+
* async function main() {
|
|
11133
|
+
* const auth = new google.auth.GoogleAuth({
|
|
11134
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
11135
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
11136
|
+
* });
|
|
11137
|
+
*
|
|
11138
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
11139
|
+
* const authClient = await auth.getClient();
|
|
11140
|
+
* google.options({auth: authClient});
|
|
11141
|
+
*
|
|
11142
|
+
* // Do the magic
|
|
11143
|
+
* const res =
|
|
11144
|
+
* await securitycenter.organizations.containerThreatDetectionSettings.calculate(
|
|
11145
|
+
* {
|
|
11146
|
+
* // Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
11147
|
+
* name: 'organizations/my-organization/containerThreatDetectionSettings',
|
|
11148
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
11149
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
11150
|
+
* },
|
|
11151
|
+
* );
|
|
11152
|
+
* console.log(res.data);
|
|
11153
|
+
*
|
|
11154
|
+
* // Example response
|
|
11155
|
+
* // {
|
|
11156
|
+
* // "modules": {},
|
|
11157
|
+
* // "name": "my_name",
|
|
11158
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
11159
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
11160
|
+
* // "updateTime": "my_updateTime"
|
|
11161
|
+
* // }
|
|
11162
|
+
* }
|
|
11163
|
+
*
|
|
11164
|
+
* main().catch(e => {
|
|
11165
|
+
* console.error(e);
|
|
11166
|
+
* throw e;
|
|
11167
|
+
* });
|
|
11168
|
+
*
|
|
11169
|
+
* ```
|
|
9052
11170
|
*
|
|
9053
11171
|
* @param params - Parameters for request
|
|
9054
11172
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9171,6 +11289,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
9171
11289
|
|
|
9172
11290
|
/**
|
|
9173
11291
|
* Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
11292
|
+
* @example
|
|
11293
|
+
* ```js
|
|
11294
|
+
* // Before running the sample:
|
|
11295
|
+
* // - Enable the API at:
|
|
11296
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
11297
|
+
* // - Login into gcloud by running:
|
|
11298
|
+
* // ```sh
|
|
11299
|
+
* // $ gcloud auth application-default login
|
|
11300
|
+
* // ```
|
|
11301
|
+
* // - Install the npm module by running:
|
|
11302
|
+
* // ```sh
|
|
11303
|
+
* // $ npm install googleapis
|
|
11304
|
+
* // ```
|
|
11305
|
+
*
|
|
11306
|
+
* const {google} = require('googleapis');
|
|
11307
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
11308
|
+
*
|
|
11309
|
+
* async function main() {
|
|
11310
|
+
* const auth = new google.auth.GoogleAuth({
|
|
11311
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
11312
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
11313
|
+
* });
|
|
11314
|
+
*
|
|
11315
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
11316
|
+
* const authClient = await auth.getClient();
|
|
11317
|
+
* google.options({auth: authClient});
|
|
11318
|
+
*
|
|
11319
|
+
* // Do the magic
|
|
11320
|
+
* const res =
|
|
11321
|
+
* await securitycenter.organizations.eventThreatDetectionSettings.calculate({
|
|
11322
|
+
* // Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
11323
|
+
* name: 'organizations/my-organization/eventThreatDetectionSettings',
|
|
11324
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
11325
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
11326
|
+
* });
|
|
11327
|
+
* console.log(res.data);
|
|
11328
|
+
*
|
|
11329
|
+
* // Example response
|
|
11330
|
+
* // {
|
|
11331
|
+
* // "modules": {},
|
|
11332
|
+
* // "name": "my_name",
|
|
11333
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
11334
|
+
* // "updateTime": "my_updateTime"
|
|
11335
|
+
* // }
|
|
11336
|
+
* }
|
|
11337
|
+
*
|
|
11338
|
+
* main().catch(e => {
|
|
11339
|
+
* console.error(e);
|
|
11340
|
+
* throw e;
|
|
11341
|
+
* });
|
|
11342
|
+
*
|
|
11343
|
+
* ```
|
|
9174
11344
|
*
|
|
9175
11345
|
* @param params - Parameters for request
|
|
9176
11346
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9289,6 +11459,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
9289
11459
|
|
|
9290
11460
|
/**
|
|
9291
11461
|
* Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
11462
|
+
* @example
|
|
11463
|
+
* ```js
|
|
11464
|
+
* // Before running the sample:
|
|
11465
|
+
* // - Enable the API at:
|
|
11466
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
11467
|
+
* // - Login into gcloud by running:
|
|
11468
|
+
* // ```sh
|
|
11469
|
+
* // $ gcloud auth application-default login
|
|
11470
|
+
* // ```
|
|
11471
|
+
* // - Install the npm module by running:
|
|
11472
|
+
* // ```sh
|
|
11473
|
+
* // $ npm install googleapis
|
|
11474
|
+
* // ```
|
|
11475
|
+
*
|
|
11476
|
+
* const {google} = require('googleapis');
|
|
11477
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
11478
|
+
*
|
|
11479
|
+
* async function main() {
|
|
11480
|
+
* const auth = new google.auth.GoogleAuth({
|
|
11481
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
11482
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
11483
|
+
* });
|
|
11484
|
+
*
|
|
11485
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
11486
|
+
* const authClient = await auth.getClient();
|
|
11487
|
+
* google.options({auth: authClient});
|
|
11488
|
+
*
|
|
11489
|
+
* // Do the magic
|
|
11490
|
+
* const res =
|
|
11491
|
+
* await securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate(
|
|
11492
|
+
* {
|
|
11493
|
+
* // Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
11494
|
+
* name: 'organizations/my-organization/rapidVulnerabilityDetectionSettings',
|
|
11495
|
+
* },
|
|
11496
|
+
* );
|
|
11497
|
+
* console.log(res.data);
|
|
11498
|
+
*
|
|
11499
|
+
* // Example response
|
|
11500
|
+
* // {
|
|
11501
|
+
* // "modules": {},
|
|
11502
|
+
* // "name": "my_name",
|
|
11503
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
11504
|
+
* // "updateTime": "my_updateTime"
|
|
11505
|
+
* // }
|
|
11506
|
+
* }
|
|
11507
|
+
*
|
|
11508
|
+
* main().catch(e => {
|
|
11509
|
+
* console.error(e);
|
|
11510
|
+
* throw e;
|
|
11511
|
+
* });
|
|
11512
|
+
*
|
|
11513
|
+
* ```
|
|
9292
11514
|
*
|
|
9293
11515
|
* @param params - Parameters for request
|
|
9294
11516
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9407,6 +11629,61 @@ export namespace securitycenter_v1beta2 {
|
|
|
9407
11629
|
|
|
9408
11630
|
/**
|
|
9409
11631
|
* Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
11632
|
+
* @example
|
|
11633
|
+
* ```js
|
|
11634
|
+
* // Before running the sample:
|
|
11635
|
+
* // - Enable the API at:
|
|
11636
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
11637
|
+
* // - Login into gcloud by running:
|
|
11638
|
+
* // ```sh
|
|
11639
|
+
* // $ gcloud auth application-default login
|
|
11640
|
+
* // ```
|
|
11641
|
+
* // - Install the npm module by running:
|
|
11642
|
+
* // ```sh
|
|
11643
|
+
* // $ npm install googleapis
|
|
11644
|
+
* // ```
|
|
11645
|
+
*
|
|
11646
|
+
* const {google} = require('googleapis');
|
|
11647
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
11648
|
+
*
|
|
11649
|
+
* async function main() {
|
|
11650
|
+
* const auth = new google.auth.GoogleAuth({
|
|
11651
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
11652
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
11653
|
+
* });
|
|
11654
|
+
*
|
|
11655
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
11656
|
+
* const authClient = await auth.getClient();
|
|
11657
|
+
* google.options({auth: authClient});
|
|
11658
|
+
*
|
|
11659
|
+
* // Do the magic
|
|
11660
|
+
* const res =
|
|
11661
|
+
* await securitycenter.organizations.securityHealthAnalyticsSettings.calculate(
|
|
11662
|
+
* {
|
|
11663
|
+
* // Required. The name of the SecurityHealthAnalyticsSettings to calculate. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
11664
|
+
* name: 'organizations/my-organization/securityHealthAnalyticsSettings',
|
|
11665
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
11666
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
11667
|
+
* },
|
|
11668
|
+
* );
|
|
11669
|
+
* console.log(res.data);
|
|
11670
|
+
*
|
|
11671
|
+
* // Example response
|
|
11672
|
+
* // {
|
|
11673
|
+
* // "modules": {},
|
|
11674
|
+
* // "name": "my_name",
|
|
11675
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
11676
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
11677
|
+
* // "updateTime": "my_updateTime"
|
|
11678
|
+
* // }
|
|
11679
|
+
* }
|
|
11680
|
+
*
|
|
11681
|
+
* main().catch(e => {
|
|
11682
|
+
* console.error(e);
|
|
11683
|
+
* throw e;
|
|
11684
|
+
* });
|
|
11685
|
+
*
|
|
11686
|
+
* ```
|
|
9410
11687
|
*
|
|
9411
11688
|
* @param params - Parameters for request
|
|
9412
11689
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9525,6 +11802,61 @@ export namespace securitycenter_v1beta2 {
|
|
|
9525
11802
|
|
|
9526
11803
|
/**
|
|
9527
11804
|
* Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
11805
|
+
* @example
|
|
11806
|
+
* ```js
|
|
11807
|
+
* // Before running the sample:
|
|
11808
|
+
* // - Enable the API at:
|
|
11809
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
11810
|
+
* // - Login into gcloud by running:
|
|
11811
|
+
* // ```sh
|
|
11812
|
+
* // $ gcloud auth application-default login
|
|
11813
|
+
* // ```
|
|
11814
|
+
* // - Install the npm module by running:
|
|
11815
|
+
* // ```sh
|
|
11816
|
+
* // $ npm install googleapis
|
|
11817
|
+
* // ```
|
|
11818
|
+
*
|
|
11819
|
+
* const {google} = require('googleapis');
|
|
11820
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
11821
|
+
*
|
|
11822
|
+
* async function main() {
|
|
11823
|
+
* const auth = new google.auth.GoogleAuth({
|
|
11824
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
11825
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
11826
|
+
* });
|
|
11827
|
+
*
|
|
11828
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
11829
|
+
* const authClient = await auth.getClient();
|
|
11830
|
+
* google.options({auth: authClient});
|
|
11831
|
+
*
|
|
11832
|
+
* // Do the magic
|
|
11833
|
+
* const res =
|
|
11834
|
+
* await securitycenter.organizations.virtualMachineThreatDetectionSettings.calculate(
|
|
11835
|
+
* {
|
|
11836
|
+
* // Required. The name of the VirtualMachineThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
11837
|
+
* name: 'organizations/my-organization/virtualMachineThreatDetectionSettings',
|
|
11838
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
11839
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
11840
|
+
* },
|
|
11841
|
+
* );
|
|
11842
|
+
* console.log(res.data);
|
|
11843
|
+
*
|
|
11844
|
+
* // Example response
|
|
11845
|
+
* // {
|
|
11846
|
+
* // "modules": {},
|
|
11847
|
+
* // "name": "my_name",
|
|
11848
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
11849
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
11850
|
+
* // "updateTime": "my_updateTime"
|
|
11851
|
+
* // }
|
|
11852
|
+
* }
|
|
11853
|
+
*
|
|
11854
|
+
* main().catch(e => {
|
|
11855
|
+
* console.error(e);
|
|
11856
|
+
* throw e;
|
|
11857
|
+
* });
|
|
11858
|
+
*
|
|
11859
|
+
* ```
|
|
9528
11860
|
*
|
|
9529
11861
|
* @param params - Parameters for request
|
|
9530
11862
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9647,6 +11979,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
9647
11979
|
|
|
9648
11980
|
/**
|
|
9649
11981
|
* Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
11982
|
+
* @example
|
|
11983
|
+
* ```js
|
|
11984
|
+
* // Before running the sample:
|
|
11985
|
+
* // - Enable the API at:
|
|
11986
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
11987
|
+
* // - Login into gcloud by running:
|
|
11988
|
+
* // ```sh
|
|
11989
|
+
* // $ gcloud auth application-default login
|
|
11990
|
+
* // ```
|
|
11991
|
+
* // - Install the npm module by running:
|
|
11992
|
+
* // ```sh
|
|
11993
|
+
* // $ npm install googleapis
|
|
11994
|
+
* // ```
|
|
11995
|
+
*
|
|
11996
|
+
* const {google} = require('googleapis');
|
|
11997
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
11998
|
+
*
|
|
11999
|
+
* async function main() {
|
|
12000
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12001
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12002
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12003
|
+
* });
|
|
12004
|
+
*
|
|
12005
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12006
|
+
* const authClient = await auth.getClient();
|
|
12007
|
+
* google.options({auth: authClient});
|
|
12008
|
+
*
|
|
12009
|
+
* // Do the magic
|
|
12010
|
+
* const res =
|
|
12011
|
+
* await securitycenter.organizations.webSecurityScannerSettings.calculate({
|
|
12012
|
+
* // Required. The name of the WebSecurityScannerSettings to calculate. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
12013
|
+
* name: 'organizations/my-organization/webSecurityScannerSettings',
|
|
12014
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
12015
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
12016
|
+
* });
|
|
12017
|
+
* console.log(res.data);
|
|
12018
|
+
*
|
|
12019
|
+
* // Example response
|
|
12020
|
+
* // {
|
|
12021
|
+
* // "modules": {},
|
|
12022
|
+
* // "name": "my_name",
|
|
12023
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
12024
|
+
* // "updateTime": "my_updateTime"
|
|
12025
|
+
* // }
|
|
12026
|
+
* }
|
|
12027
|
+
*
|
|
12028
|
+
* main().catch(e => {
|
|
12029
|
+
* console.error(e);
|
|
12030
|
+
* throw e;
|
|
12031
|
+
* });
|
|
12032
|
+
*
|
|
12033
|
+
* ```
|
|
9650
12034
|
*
|
|
9651
12035
|
* @param params - Parameters for request
|
|
9652
12036
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9785,6 +12169,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
9785
12169
|
|
|
9786
12170
|
/**
|
|
9787
12171
|
* Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.
|
|
12172
|
+
* @example
|
|
12173
|
+
* ```js
|
|
12174
|
+
* // Before running the sample:
|
|
12175
|
+
* // - Enable the API at:
|
|
12176
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
12177
|
+
* // - Login into gcloud by running:
|
|
12178
|
+
* // ```sh
|
|
12179
|
+
* // $ gcloud auth application-default login
|
|
12180
|
+
* // ```
|
|
12181
|
+
* // - Install the npm module by running:
|
|
12182
|
+
* // ```sh
|
|
12183
|
+
* // $ npm install googleapis
|
|
12184
|
+
* // ```
|
|
12185
|
+
*
|
|
12186
|
+
* const {google} = require('googleapis');
|
|
12187
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
12188
|
+
*
|
|
12189
|
+
* async function main() {
|
|
12190
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12191
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12192
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12193
|
+
* });
|
|
12194
|
+
*
|
|
12195
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12196
|
+
* const authClient = await auth.getClient();
|
|
12197
|
+
* google.options({auth: authClient});
|
|
12198
|
+
*
|
|
12199
|
+
* // Do the magic
|
|
12200
|
+
* const res = await securitycenter.projects.getContainerThreatDetectionSettings(
|
|
12201
|
+
* {
|
|
12202
|
+
* // Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
12203
|
+
* name: 'projects/my-project/containerThreatDetectionSettings',
|
|
12204
|
+
* },
|
|
12205
|
+
* );
|
|
12206
|
+
* console.log(res.data);
|
|
12207
|
+
*
|
|
12208
|
+
* // Example response
|
|
12209
|
+
* // {
|
|
12210
|
+
* // "modules": {},
|
|
12211
|
+
* // "name": "my_name",
|
|
12212
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
12213
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
12214
|
+
* // "updateTime": "my_updateTime"
|
|
12215
|
+
* // }
|
|
12216
|
+
* }
|
|
12217
|
+
*
|
|
12218
|
+
* main().catch(e => {
|
|
12219
|
+
* console.error(e);
|
|
12220
|
+
* throw e;
|
|
12221
|
+
* });
|
|
12222
|
+
*
|
|
12223
|
+
* ```
|
|
9788
12224
|
*
|
|
9789
12225
|
* @param params - Parameters for request
|
|
9790
12226
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9885,6 +12321,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
9885
12321
|
|
|
9886
12322
|
/**
|
|
9887
12323
|
* Get the EventThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetEventThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateEventThreatDetectionSettings for this purpose.
|
|
12324
|
+
* @example
|
|
12325
|
+
* ```js
|
|
12326
|
+
* // Before running the sample:
|
|
12327
|
+
* // - Enable the API at:
|
|
12328
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
12329
|
+
* // - Login into gcloud by running:
|
|
12330
|
+
* // ```sh
|
|
12331
|
+
* // $ gcloud auth application-default login
|
|
12332
|
+
* // ```
|
|
12333
|
+
* // - Install the npm module by running:
|
|
12334
|
+
* // ```sh
|
|
12335
|
+
* // $ npm install googleapis
|
|
12336
|
+
* // ```
|
|
12337
|
+
*
|
|
12338
|
+
* const {google} = require('googleapis');
|
|
12339
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
12340
|
+
*
|
|
12341
|
+
* async function main() {
|
|
12342
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12343
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12344
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12345
|
+
* });
|
|
12346
|
+
*
|
|
12347
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12348
|
+
* const authClient = await auth.getClient();
|
|
12349
|
+
* google.options({auth: authClient});
|
|
12350
|
+
*
|
|
12351
|
+
* // Do the magic
|
|
12352
|
+
* const res = await securitycenter.projects.getEventThreatDetectionSettings({
|
|
12353
|
+
* // Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
12354
|
+
* name: 'projects/my-project/eventThreatDetectionSettings',
|
|
12355
|
+
* });
|
|
12356
|
+
* console.log(res.data);
|
|
12357
|
+
*
|
|
12358
|
+
* // Example response
|
|
12359
|
+
* // {
|
|
12360
|
+
* // "modules": {},
|
|
12361
|
+
* // "name": "my_name",
|
|
12362
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
12363
|
+
* // "updateTime": "my_updateTime"
|
|
12364
|
+
* // }
|
|
12365
|
+
* }
|
|
12366
|
+
*
|
|
12367
|
+
* main().catch(e => {
|
|
12368
|
+
* console.error(e);
|
|
12369
|
+
* throw e;
|
|
12370
|
+
* });
|
|
12371
|
+
*
|
|
12372
|
+
* ```
|
|
9888
12373
|
*
|
|
9889
12374
|
* @param params - Parameters for request
|
|
9890
12375
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9980,6 +12465,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
9980
12465
|
|
|
9981
12466
|
/**
|
|
9982
12467
|
* Get the RapidVulnerabilityDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetRapidVulnerabilityDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this purpose.
|
|
12468
|
+
* @example
|
|
12469
|
+
* ```js
|
|
12470
|
+
* // Before running the sample:
|
|
12471
|
+
* // - Enable the API at:
|
|
12472
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
12473
|
+
* // - Login into gcloud by running:
|
|
12474
|
+
* // ```sh
|
|
12475
|
+
* // $ gcloud auth application-default login
|
|
12476
|
+
* // ```
|
|
12477
|
+
* // - Install the npm module by running:
|
|
12478
|
+
* // ```sh
|
|
12479
|
+
* // $ npm install googleapis
|
|
12480
|
+
* // ```
|
|
12481
|
+
*
|
|
12482
|
+
* const {google} = require('googleapis');
|
|
12483
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
12484
|
+
*
|
|
12485
|
+
* async function main() {
|
|
12486
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12487
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12488
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12489
|
+
* });
|
|
12490
|
+
*
|
|
12491
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12492
|
+
* const authClient = await auth.getClient();
|
|
12493
|
+
* google.options({auth: authClient});
|
|
12494
|
+
*
|
|
12495
|
+
* // Do the magic
|
|
12496
|
+
* const res =
|
|
12497
|
+
* await securitycenter.projects.getRapidVulnerabilityDetectionSettings({
|
|
12498
|
+
* // Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
12499
|
+
* name: 'projects/my-project/rapidVulnerabilityDetectionSettings',
|
|
12500
|
+
* });
|
|
12501
|
+
* console.log(res.data);
|
|
12502
|
+
*
|
|
12503
|
+
* // Example response
|
|
12504
|
+
* // {
|
|
12505
|
+
* // "modules": {},
|
|
12506
|
+
* // "name": "my_name",
|
|
12507
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
12508
|
+
* // "updateTime": "my_updateTime"
|
|
12509
|
+
* // }
|
|
12510
|
+
* }
|
|
12511
|
+
*
|
|
12512
|
+
* main().catch(e => {
|
|
12513
|
+
* console.error(e);
|
|
12514
|
+
* throw e;
|
|
12515
|
+
* });
|
|
12516
|
+
*
|
|
12517
|
+
* ```
|
|
9983
12518
|
*
|
|
9984
12519
|
* @param params - Parameters for request
|
|
9985
12520
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10080,6 +12615,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
10080
12615
|
|
|
10081
12616
|
/**
|
|
10082
12617
|
* Get the SecurityCenterSettings resource.
|
|
12618
|
+
* @example
|
|
12619
|
+
* ```js
|
|
12620
|
+
* // Before running the sample:
|
|
12621
|
+
* // - Enable the API at:
|
|
12622
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
12623
|
+
* // - Login into gcloud by running:
|
|
12624
|
+
* // ```sh
|
|
12625
|
+
* // $ gcloud auth application-default login
|
|
12626
|
+
* // ```
|
|
12627
|
+
* // - Install the npm module by running:
|
|
12628
|
+
* // ```sh
|
|
12629
|
+
* // $ npm install googleapis
|
|
12630
|
+
* // ```
|
|
12631
|
+
*
|
|
12632
|
+
* const {google} = require('googleapis');
|
|
12633
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
12634
|
+
*
|
|
12635
|
+
* async function main() {
|
|
12636
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12637
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12638
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12639
|
+
* });
|
|
12640
|
+
*
|
|
12641
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12642
|
+
* const authClient = await auth.getClient();
|
|
12643
|
+
* google.options({auth: authClient});
|
|
12644
|
+
*
|
|
12645
|
+
* // Do the magic
|
|
12646
|
+
* const res = await securitycenter.projects.getSecurityCenterSettings({
|
|
12647
|
+
* // Required. The name of the SecurityCenterSettings to retrieve. Format: organizations/{organization\}/securityCenterSettings Format: folders/{folder\}/securityCenterSettings Format: projects/{project\}/securityCenterSettings
|
|
12648
|
+
* name: 'projects/my-project/securityCenterSettings',
|
|
12649
|
+
* });
|
|
12650
|
+
* console.log(res.data);
|
|
12651
|
+
*
|
|
12652
|
+
* // Example response
|
|
12653
|
+
* // {
|
|
12654
|
+
* // "logSinkProject": "my_logSinkProject",
|
|
12655
|
+
* // "name": "my_name",
|
|
12656
|
+
* // "onboardingTime": "my_onboardingTime",
|
|
12657
|
+
* // "orgServiceAccount": "my_orgServiceAccount"
|
|
12658
|
+
* // }
|
|
12659
|
+
* }
|
|
12660
|
+
*
|
|
12661
|
+
* main().catch(e => {
|
|
12662
|
+
* console.error(e);
|
|
12663
|
+
* throw e;
|
|
12664
|
+
* });
|
|
12665
|
+
*
|
|
12666
|
+
* ```
|
|
10083
12667
|
*
|
|
10084
12668
|
* @param params - Parameters for request
|
|
10085
12669
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10173,6 +12757,56 @@ export namespace securitycenter_v1beta2 {
|
|
|
10173
12757
|
|
|
10174
12758
|
/**
|
|
10175
12759
|
* Get the SecurityHealthAnalyticsSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetSecurityHealthAnalyticsSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateSecurityHealthAnalyticsSettings for this purpose.
|
|
12760
|
+
* @example
|
|
12761
|
+
* ```js
|
|
12762
|
+
* // Before running the sample:
|
|
12763
|
+
* // - Enable the API at:
|
|
12764
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
12765
|
+
* // - Login into gcloud by running:
|
|
12766
|
+
* // ```sh
|
|
12767
|
+
* // $ gcloud auth application-default login
|
|
12768
|
+
* // ```
|
|
12769
|
+
* // - Install the npm module by running:
|
|
12770
|
+
* // ```sh
|
|
12771
|
+
* // $ npm install googleapis
|
|
12772
|
+
* // ```
|
|
12773
|
+
*
|
|
12774
|
+
* const {google} = require('googleapis');
|
|
12775
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
12776
|
+
*
|
|
12777
|
+
* async function main() {
|
|
12778
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12779
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12780
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12781
|
+
* });
|
|
12782
|
+
*
|
|
12783
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12784
|
+
* const authClient = await auth.getClient();
|
|
12785
|
+
* google.options({auth: authClient});
|
|
12786
|
+
*
|
|
12787
|
+
* // Do the magic
|
|
12788
|
+
* const res = await securitycenter.projects.getSecurityHealthAnalyticsSettings({
|
|
12789
|
+
* // Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
12790
|
+
* name: 'projects/my-project/securityHealthAnalyticsSettings',
|
|
12791
|
+
* });
|
|
12792
|
+
* console.log(res.data);
|
|
12793
|
+
*
|
|
12794
|
+
* // Example response
|
|
12795
|
+
* // {
|
|
12796
|
+
* // "modules": {},
|
|
12797
|
+
* // "name": "my_name",
|
|
12798
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
12799
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
12800
|
+
* // "updateTime": "my_updateTime"
|
|
12801
|
+
* // }
|
|
12802
|
+
* }
|
|
12803
|
+
*
|
|
12804
|
+
* main().catch(e => {
|
|
12805
|
+
* console.error(e);
|
|
12806
|
+
* throw e;
|
|
12807
|
+
* });
|
|
12808
|
+
*
|
|
12809
|
+
* ```
|
|
10176
12810
|
*
|
|
10177
12811
|
* @param params - Parameters for request
|
|
10178
12812
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10269,6 +12903,57 @@ export namespace securitycenter_v1beta2 {
|
|
|
10269
12903
|
|
|
10270
12904
|
/**
|
|
10271
12905
|
* Get the VirtualMachineThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetVirtualMachineThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for this purpose.
|
|
12906
|
+
* @example
|
|
12907
|
+
* ```js
|
|
12908
|
+
* // Before running the sample:
|
|
12909
|
+
* // - Enable the API at:
|
|
12910
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
12911
|
+
* // - Login into gcloud by running:
|
|
12912
|
+
* // ```sh
|
|
12913
|
+
* // $ gcloud auth application-default login
|
|
12914
|
+
* // ```
|
|
12915
|
+
* // - Install the npm module by running:
|
|
12916
|
+
* // ```sh
|
|
12917
|
+
* // $ npm install googleapis
|
|
12918
|
+
* // ```
|
|
12919
|
+
*
|
|
12920
|
+
* const {google} = require('googleapis');
|
|
12921
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
12922
|
+
*
|
|
12923
|
+
* async function main() {
|
|
12924
|
+
* const auth = new google.auth.GoogleAuth({
|
|
12925
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
12926
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
12927
|
+
* });
|
|
12928
|
+
*
|
|
12929
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
12930
|
+
* const authClient = await auth.getClient();
|
|
12931
|
+
* google.options({auth: authClient});
|
|
12932
|
+
*
|
|
12933
|
+
* // Do the magic
|
|
12934
|
+
* const res =
|
|
12935
|
+
* await securitycenter.projects.getVirtualMachineThreatDetectionSettings({
|
|
12936
|
+
* // Required. The name of the VirtualMachineThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
12937
|
+
* name: 'projects/my-project/virtualMachineThreatDetectionSettings',
|
|
12938
|
+
* });
|
|
12939
|
+
* console.log(res.data);
|
|
12940
|
+
*
|
|
12941
|
+
* // Example response
|
|
12942
|
+
* // {
|
|
12943
|
+
* // "modules": {},
|
|
12944
|
+
* // "name": "my_name",
|
|
12945
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
12946
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
12947
|
+
* // "updateTime": "my_updateTime"
|
|
12948
|
+
* // }
|
|
12949
|
+
* }
|
|
12950
|
+
*
|
|
12951
|
+
* main().catch(e => {
|
|
12952
|
+
* console.error(e);
|
|
12953
|
+
* throw e;
|
|
12954
|
+
* });
|
|
12955
|
+
*
|
|
12956
|
+
* ```
|
|
10272
12957
|
*
|
|
10273
12958
|
* @param params - Parameters for request
|
|
10274
12959
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10369,6 +13054,55 @@ export namespace securitycenter_v1beta2 {
|
|
|
10369
13054
|
|
|
10370
13055
|
/**
|
|
10371
13056
|
* Get the WebSecurityScannerSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetWebSecurityScannerSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateWebSecurityScannerSettings for this purpose.
|
|
13057
|
+
* @example
|
|
13058
|
+
* ```js
|
|
13059
|
+
* // Before running the sample:
|
|
13060
|
+
* // - Enable the API at:
|
|
13061
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
13062
|
+
* // - Login into gcloud by running:
|
|
13063
|
+
* // ```sh
|
|
13064
|
+
* // $ gcloud auth application-default login
|
|
13065
|
+
* // ```
|
|
13066
|
+
* // - Install the npm module by running:
|
|
13067
|
+
* // ```sh
|
|
13068
|
+
* // $ npm install googleapis
|
|
13069
|
+
* // ```
|
|
13070
|
+
*
|
|
13071
|
+
* const {google} = require('googleapis');
|
|
13072
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
13073
|
+
*
|
|
13074
|
+
* async function main() {
|
|
13075
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13076
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13077
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
13078
|
+
* });
|
|
13079
|
+
*
|
|
13080
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13081
|
+
* const authClient = await auth.getClient();
|
|
13082
|
+
* google.options({auth: authClient});
|
|
13083
|
+
*
|
|
13084
|
+
* // Do the magic
|
|
13085
|
+
* const res = await securitycenter.projects.getWebSecurityScannerSettings({
|
|
13086
|
+
* // Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
13087
|
+
* name: 'projects/my-project/webSecurityScannerSettings',
|
|
13088
|
+
* });
|
|
13089
|
+
* console.log(res.data);
|
|
13090
|
+
*
|
|
13091
|
+
* // Example response
|
|
13092
|
+
* // {
|
|
13093
|
+
* // "modules": {},
|
|
13094
|
+
* // "name": "my_name",
|
|
13095
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13096
|
+
* // "updateTime": "my_updateTime"
|
|
13097
|
+
* // }
|
|
13098
|
+
* }
|
|
13099
|
+
*
|
|
13100
|
+
* main().catch(e => {
|
|
13101
|
+
* console.error(e);
|
|
13102
|
+
* throw e;
|
|
13103
|
+
* });
|
|
13104
|
+
*
|
|
13105
|
+
* ```
|
|
10372
13106
|
*
|
|
10373
13107
|
* @param params - Parameters for request
|
|
10374
13108
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10462,6 +13196,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
10462
13196
|
|
|
10463
13197
|
/**
|
|
10464
13198
|
* Update the ContainerThreatDetectionSettings resource.
|
|
13199
|
+
* @example
|
|
13200
|
+
* ```js
|
|
13201
|
+
* // Before running the sample:
|
|
13202
|
+
* // - Enable the API at:
|
|
13203
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
13204
|
+
* // - Login into gcloud by running:
|
|
13205
|
+
* // ```sh
|
|
13206
|
+
* // $ gcloud auth application-default login
|
|
13207
|
+
* // ```
|
|
13208
|
+
* // - Install the npm module by running:
|
|
13209
|
+
* // ```sh
|
|
13210
|
+
* // $ npm install googleapis
|
|
13211
|
+
* // ```
|
|
13212
|
+
*
|
|
13213
|
+
* const {google} = require('googleapis');
|
|
13214
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
13215
|
+
*
|
|
13216
|
+
* async function main() {
|
|
13217
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13218
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13219
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
13220
|
+
* });
|
|
13221
|
+
*
|
|
13222
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13223
|
+
* const authClient = await auth.getClient();
|
|
13224
|
+
* google.options({auth: authClient});
|
|
13225
|
+
*
|
|
13226
|
+
* // Do the magic
|
|
13227
|
+
* const res =
|
|
13228
|
+
* await securitycenter.projects.updateContainerThreatDetectionSettings({
|
|
13229
|
+
* // Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
13230
|
+
* name: 'projects/my-project/containerThreatDetectionSettings',
|
|
13231
|
+
* // The list of fields to be updated.
|
|
13232
|
+
* updateMask: 'placeholder-value',
|
|
13233
|
+
*
|
|
13234
|
+
* // Request body metadata
|
|
13235
|
+
* requestBody: {
|
|
13236
|
+
* // request body parameters
|
|
13237
|
+
* // {
|
|
13238
|
+
* // "modules": {},
|
|
13239
|
+
* // "name": "my_name",
|
|
13240
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
13241
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13242
|
+
* // "updateTime": "my_updateTime"
|
|
13243
|
+
* // }
|
|
13244
|
+
* },
|
|
13245
|
+
* });
|
|
13246
|
+
* console.log(res.data);
|
|
13247
|
+
*
|
|
13248
|
+
* // Example response
|
|
13249
|
+
* // {
|
|
13250
|
+
* // "modules": {},
|
|
13251
|
+
* // "name": "my_name",
|
|
13252
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
13253
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13254
|
+
* // "updateTime": "my_updateTime"
|
|
13255
|
+
* // }
|
|
13256
|
+
* }
|
|
13257
|
+
*
|
|
13258
|
+
* main().catch(e => {
|
|
13259
|
+
* console.error(e);
|
|
13260
|
+
* throw e;
|
|
13261
|
+
* });
|
|
13262
|
+
*
|
|
13263
|
+
* ```
|
|
10465
13264
|
*
|
|
10466
13265
|
* @param params - Parameters for request
|
|
10467
13266
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10562,6 +13361,68 @@ export namespace securitycenter_v1beta2 {
|
|
|
10562
13361
|
|
|
10563
13362
|
/**
|
|
10564
13363
|
* Update the EventThreatDetectionSettings resource.
|
|
13364
|
+
* @example
|
|
13365
|
+
* ```js
|
|
13366
|
+
* // Before running the sample:
|
|
13367
|
+
* // - Enable the API at:
|
|
13368
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
13369
|
+
* // - Login into gcloud by running:
|
|
13370
|
+
* // ```sh
|
|
13371
|
+
* // $ gcloud auth application-default login
|
|
13372
|
+
* // ```
|
|
13373
|
+
* // - Install the npm module by running:
|
|
13374
|
+
* // ```sh
|
|
13375
|
+
* // $ npm install googleapis
|
|
13376
|
+
* // ```
|
|
13377
|
+
*
|
|
13378
|
+
* const {google} = require('googleapis');
|
|
13379
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
13380
|
+
*
|
|
13381
|
+
* async function main() {
|
|
13382
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13383
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13384
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
13385
|
+
* });
|
|
13386
|
+
*
|
|
13387
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13388
|
+
* const authClient = await auth.getClient();
|
|
13389
|
+
* google.options({auth: authClient});
|
|
13390
|
+
*
|
|
13391
|
+
* // Do the magic
|
|
13392
|
+
* const res = await securitycenter.projects.updateEventThreatDetectionSettings({
|
|
13393
|
+
* // Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
13394
|
+
* name: 'projects/my-project/eventThreatDetectionSettings',
|
|
13395
|
+
* // The list of fields to be updated.
|
|
13396
|
+
* updateMask: 'placeholder-value',
|
|
13397
|
+
*
|
|
13398
|
+
* // Request body metadata
|
|
13399
|
+
* requestBody: {
|
|
13400
|
+
* // request body parameters
|
|
13401
|
+
* // {
|
|
13402
|
+
* // "modules": {},
|
|
13403
|
+
* // "name": "my_name",
|
|
13404
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13405
|
+
* // "updateTime": "my_updateTime"
|
|
13406
|
+
* // }
|
|
13407
|
+
* },
|
|
13408
|
+
* });
|
|
13409
|
+
* console.log(res.data);
|
|
13410
|
+
*
|
|
13411
|
+
* // Example response
|
|
13412
|
+
* // {
|
|
13413
|
+
* // "modules": {},
|
|
13414
|
+
* // "name": "my_name",
|
|
13415
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13416
|
+
* // "updateTime": "my_updateTime"
|
|
13417
|
+
* // }
|
|
13418
|
+
* }
|
|
13419
|
+
*
|
|
13420
|
+
* main().catch(e => {
|
|
13421
|
+
* console.error(e);
|
|
13422
|
+
* throw e;
|
|
13423
|
+
* });
|
|
13424
|
+
*
|
|
13425
|
+
* ```
|
|
10565
13426
|
*
|
|
10566
13427
|
* @param params - Parameters for request
|
|
10567
13428
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10658,6 +13519,69 @@ export namespace securitycenter_v1beta2 {
|
|
|
10658
13519
|
|
|
10659
13520
|
/**
|
|
10660
13521
|
* Update the RapidVulnerabilityDetectionSettings resource.
|
|
13522
|
+
* @example
|
|
13523
|
+
* ```js
|
|
13524
|
+
* // Before running the sample:
|
|
13525
|
+
* // - Enable the API at:
|
|
13526
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
13527
|
+
* // - Login into gcloud by running:
|
|
13528
|
+
* // ```sh
|
|
13529
|
+
* // $ gcloud auth application-default login
|
|
13530
|
+
* // ```
|
|
13531
|
+
* // - Install the npm module by running:
|
|
13532
|
+
* // ```sh
|
|
13533
|
+
* // $ npm install googleapis
|
|
13534
|
+
* // ```
|
|
13535
|
+
*
|
|
13536
|
+
* const {google} = require('googleapis');
|
|
13537
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
13538
|
+
*
|
|
13539
|
+
* async function main() {
|
|
13540
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13541
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13542
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
13543
|
+
* });
|
|
13544
|
+
*
|
|
13545
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13546
|
+
* const authClient = await auth.getClient();
|
|
13547
|
+
* google.options({auth: authClient});
|
|
13548
|
+
*
|
|
13549
|
+
* // Do the magic
|
|
13550
|
+
* const res =
|
|
13551
|
+
* await securitycenter.projects.updateRapidVulnerabilityDetectionSettings({
|
|
13552
|
+
* // The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
13553
|
+
* name: 'projects/my-project/rapidVulnerabilityDetectionSettings',
|
|
13554
|
+
* // The list of fields to be updated.
|
|
13555
|
+
* updateMask: 'placeholder-value',
|
|
13556
|
+
*
|
|
13557
|
+
* // Request body metadata
|
|
13558
|
+
* requestBody: {
|
|
13559
|
+
* // request body parameters
|
|
13560
|
+
* // {
|
|
13561
|
+
* // "modules": {},
|
|
13562
|
+
* // "name": "my_name",
|
|
13563
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13564
|
+
* // "updateTime": "my_updateTime"
|
|
13565
|
+
* // }
|
|
13566
|
+
* },
|
|
13567
|
+
* });
|
|
13568
|
+
* console.log(res.data);
|
|
13569
|
+
*
|
|
13570
|
+
* // Example response
|
|
13571
|
+
* // {
|
|
13572
|
+
* // "modules": {},
|
|
13573
|
+
* // "name": "my_name",
|
|
13574
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13575
|
+
* // "updateTime": "my_updateTime"
|
|
13576
|
+
* // }
|
|
13577
|
+
* }
|
|
13578
|
+
*
|
|
13579
|
+
* main().catch(e => {
|
|
13580
|
+
* console.error(e);
|
|
13581
|
+
* throw e;
|
|
13582
|
+
* });
|
|
13583
|
+
*
|
|
13584
|
+
* ```
|
|
10661
13585
|
*
|
|
10662
13586
|
* @param params - Parameters for request
|
|
10663
13587
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10758,6 +13682,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
10758
13682
|
|
|
10759
13683
|
/**
|
|
10760
13684
|
* Update the SecurityHealthAnalyticsSettings resource.
|
|
13685
|
+
* @example
|
|
13686
|
+
* ```js
|
|
13687
|
+
* // Before running the sample:
|
|
13688
|
+
* // - Enable the API at:
|
|
13689
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
13690
|
+
* // - Login into gcloud by running:
|
|
13691
|
+
* // ```sh
|
|
13692
|
+
* // $ gcloud auth application-default login
|
|
13693
|
+
* // ```
|
|
13694
|
+
* // - Install the npm module by running:
|
|
13695
|
+
* // ```sh
|
|
13696
|
+
* // $ npm install googleapis
|
|
13697
|
+
* // ```
|
|
13698
|
+
*
|
|
13699
|
+
* const {google} = require('googleapis');
|
|
13700
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
13701
|
+
*
|
|
13702
|
+
* async function main() {
|
|
13703
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13704
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13705
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
13706
|
+
* });
|
|
13707
|
+
*
|
|
13708
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13709
|
+
* const authClient = await auth.getClient();
|
|
13710
|
+
* google.options({auth: authClient});
|
|
13711
|
+
*
|
|
13712
|
+
* // Do the magic
|
|
13713
|
+
* const res =
|
|
13714
|
+
* await securitycenter.projects.updateSecurityHealthAnalyticsSettings({
|
|
13715
|
+
* // Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
13716
|
+
* name: 'projects/my-project/securityHealthAnalyticsSettings',
|
|
13717
|
+
* // The list of fields to be updated.
|
|
13718
|
+
* updateMask: 'placeholder-value',
|
|
13719
|
+
*
|
|
13720
|
+
* // Request body metadata
|
|
13721
|
+
* requestBody: {
|
|
13722
|
+
* // request body parameters
|
|
13723
|
+
* // {
|
|
13724
|
+
* // "modules": {},
|
|
13725
|
+
* // "name": "my_name",
|
|
13726
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
13727
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13728
|
+
* // "updateTime": "my_updateTime"
|
|
13729
|
+
* // }
|
|
13730
|
+
* },
|
|
13731
|
+
* });
|
|
13732
|
+
* console.log(res.data);
|
|
13733
|
+
*
|
|
13734
|
+
* // Example response
|
|
13735
|
+
* // {
|
|
13736
|
+
* // "modules": {},
|
|
13737
|
+
* // "name": "my_name",
|
|
13738
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
13739
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13740
|
+
* // "updateTime": "my_updateTime"
|
|
13741
|
+
* // }
|
|
13742
|
+
* }
|
|
13743
|
+
*
|
|
13744
|
+
* main().catch(e => {
|
|
13745
|
+
* console.error(e);
|
|
13746
|
+
* throw e;
|
|
13747
|
+
* });
|
|
13748
|
+
*
|
|
13749
|
+
* ```
|
|
10761
13750
|
*
|
|
10762
13751
|
* @param params - Parameters for request
|
|
10763
13752
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10854,6 +13843,71 @@ export namespace securitycenter_v1beta2 {
|
|
|
10854
13843
|
|
|
10855
13844
|
/**
|
|
10856
13845
|
* Update the VirtualMachineThreatDetectionSettings resource.
|
|
13846
|
+
* @example
|
|
13847
|
+
* ```js
|
|
13848
|
+
* // Before running the sample:
|
|
13849
|
+
* // - Enable the API at:
|
|
13850
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
13851
|
+
* // - Login into gcloud by running:
|
|
13852
|
+
* // ```sh
|
|
13853
|
+
* // $ gcloud auth application-default login
|
|
13854
|
+
* // ```
|
|
13855
|
+
* // - Install the npm module by running:
|
|
13856
|
+
* // ```sh
|
|
13857
|
+
* // $ npm install googleapis
|
|
13858
|
+
* // ```
|
|
13859
|
+
*
|
|
13860
|
+
* const {google} = require('googleapis');
|
|
13861
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
13862
|
+
*
|
|
13863
|
+
* async function main() {
|
|
13864
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13865
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13866
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
13867
|
+
* });
|
|
13868
|
+
*
|
|
13869
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13870
|
+
* const authClient = await auth.getClient();
|
|
13871
|
+
* google.options({auth: authClient});
|
|
13872
|
+
*
|
|
13873
|
+
* // Do the magic
|
|
13874
|
+
* const res =
|
|
13875
|
+
* await securitycenter.projects.updateVirtualMachineThreatDetectionSettings({
|
|
13876
|
+
* // Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
13877
|
+
* name: 'projects/my-project/virtualMachineThreatDetectionSettings',
|
|
13878
|
+
* // The list of fields to be updated.
|
|
13879
|
+
* updateMask: 'placeholder-value',
|
|
13880
|
+
*
|
|
13881
|
+
* // Request body metadata
|
|
13882
|
+
* requestBody: {
|
|
13883
|
+
* // request body parameters
|
|
13884
|
+
* // {
|
|
13885
|
+
* // "modules": {},
|
|
13886
|
+
* // "name": "my_name",
|
|
13887
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
13888
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13889
|
+
* // "updateTime": "my_updateTime"
|
|
13890
|
+
* // }
|
|
13891
|
+
* },
|
|
13892
|
+
* });
|
|
13893
|
+
* console.log(res.data);
|
|
13894
|
+
*
|
|
13895
|
+
* // Example response
|
|
13896
|
+
* // {
|
|
13897
|
+
* // "modules": {},
|
|
13898
|
+
* // "name": "my_name",
|
|
13899
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
13900
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
13901
|
+
* // "updateTime": "my_updateTime"
|
|
13902
|
+
* // }
|
|
13903
|
+
* }
|
|
13904
|
+
*
|
|
13905
|
+
* main().catch(e => {
|
|
13906
|
+
* console.error(e);
|
|
13907
|
+
* throw e;
|
|
13908
|
+
* });
|
|
13909
|
+
*
|
|
13910
|
+
* ```
|
|
10857
13911
|
*
|
|
10858
13912
|
* @param params - Parameters for request
|
|
10859
13913
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10954,6 +14008,68 @@ export namespace securitycenter_v1beta2 {
|
|
|
10954
14008
|
|
|
10955
14009
|
/**
|
|
10956
14010
|
* Update the WebSecurityScannerSettings resource.
|
|
14011
|
+
* @example
|
|
14012
|
+
* ```js
|
|
14013
|
+
* // Before running the sample:
|
|
14014
|
+
* // - Enable the API at:
|
|
14015
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
14016
|
+
* // - Login into gcloud by running:
|
|
14017
|
+
* // ```sh
|
|
14018
|
+
* // $ gcloud auth application-default login
|
|
14019
|
+
* // ```
|
|
14020
|
+
* // - Install the npm module by running:
|
|
14021
|
+
* // ```sh
|
|
14022
|
+
* // $ npm install googleapis
|
|
14023
|
+
* // ```
|
|
14024
|
+
*
|
|
14025
|
+
* const {google} = require('googleapis');
|
|
14026
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
14027
|
+
*
|
|
14028
|
+
* async function main() {
|
|
14029
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14030
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14031
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
14032
|
+
* });
|
|
14033
|
+
*
|
|
14034
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14035
|
+
* const authClient = await auth.getClient();
|
|
14036
|
+
* google.options({auth: authClient});
|
|
14037
|
+
*
|
|
14038
|
+
* // Do the magic
|
|
14039
|
+
* const res = await securitycenter.projects.updateWebSecurityScannerSettings({
|
|
14040
|
+
* // Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
14041
|
+
* name: 'projects/my-project/webSecurityScannerSettings',
|
|
14042
|
+
* // The list of fields to be updated.
|
|
14043
|
+
* updateMask: 'placeholder-value',
|
|
14044
|
+
*
|
|
14045
|
+
* // Request body metadata
|
|
14046
|
+
* requestBody: {
|
|
14047
|
+
* // request body parameters
|
|
14048
|
+
* // {
|
|
14049
|
+
* // "modules": {},
|
|
14050
|
+
* // "name": "my_name",
|
|
14051
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14052
|
+
* // "updateTime": "my_updateTime"
|
|
14053
|
+
* // }
|
|
14054
|
+
* },
|
|
14055
|
+
* });
|
|
14056
|
+
* console.log(res.data);
|
|
14057
|
+
*
|
|
14058
|
+
* // Example response
|
|
14059
|
+
* // {
|
|
14060
|
+
* // "modules": {},
|
|
14061
|
+
* // "name": "my_name",
|
|
14062
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14063
|
+
* // "updateTime": "my_updateTime"
|
|
14064
|
+
* // }
|
|
14065
|
+
* }
|
|
14066
|
+
*
|
|
14067
|
+
* main().catch(e => {
|
|
14068
|
+
* console.error(e);
|
|
14069
|
+
* throw e;
|
|
14070
|
+
* });
|
|
14071
|
+
*
|
|
14072
|
+
* ```
|
|
10957
14073
|
*
|
|
10958
14074
|
* @param params - Parameters for request
|
|
10959
14075
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11201,6 +14317,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
11201
14317
|
|
|
11202
14318
|
/**
|
|
11203
14319
|
* Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
14320
|
+
* @example
|
|
14321
|
+
* ```js
|
|
14322
|
+
* // Before running the sample:
|
|
14323
|
+
* // - Enable the API at:
|
|
14324
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
14325
|
+
* // - Login into gcloud by running:
|
|
14326
|
+
* // ```sh
|
|
14327
|
+
* // $ gcloud auth application-default login
|
|
14328
|
+
* // ```
|
|
14329
|
+
* // - Install the npm module by running:
|
|
14330
|
+
* // ```sh
|
|
14331
|
+
* // $ npm install googleapis
|
|
14332
|
+
* // ```
|
|
14333
|
+
*
|
|
14334
|
+
* const {google} = require('googleapis');
|
|
14335
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
14336
|
+
*
|
|
14337
|
+
* async function main() {
|
|
14338
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14339
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14340
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
14341
|
+
* });
|
|
14342
|
+
*
|
|
14343
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14344
|
+
* const authClient = await auth.getClient();
|
|
14345
|
+
* google.options({auth: authClient});
|
|
14346
|
+
*
|
|
14347
|
+
* // Do the magic
|
|
14348
|
+
* const res =
|
|
14349
|
+
* await securitycenter.projects.containerThreatDetectionSettings.calculate({
|
|
14350
|
+
* // Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
14351
|
+
* name: 'projects/my-project/containerThreatDetectionSettings',
|
|
14352
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
14353
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
14354
|
+
* });
|
|
14355
|
+
* console.log(res.data);
|
|
14356
|
+
*
|
|
14357
|
+
* // Example response
|
|
14358
|
+
* // {
|
|
14359
|
+
* // "modules": {},
|
|
14360
|
+
* // "name": "my_name",
|
|
14361
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
14362
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14363
|
+
* // "updateTime": "my_updateTime"
|
|
14364
|
+
* // }
|
|
14365
|
+
* }
|
|
14366
|
+
*
|
|
14367
|
+
* main().catch(e => {
|
|
14368
|
+
* console.error(e);
|
|
14369
|
+
* throw e;
|
|
14370
|
+
* });
|
|
14371
|
+
*
|
|
14372
|
+
* ```
|
|
11204
14373
|
*
|
|
11205
14374
|
* @param params - Parameters for request
|
|
11206
14375
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11323,6 +14492,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
11323
14492
|
|
|
11324
14493
|
/**
|
|
11325
14494
|
* Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
14495
|
+
* @example
|
|
14496
|
+
* ```js
|
|
14497
|
+
* // Before running the sample:
|
|
14498
|
+
* // - Enable the API at:
|
|
14499
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
14500
|
+
* // - Login into gcloud by running:
|
|
14501
|
+
* // ```sh
|
|
14502
|
+
* // $ gcloud auth application-default login
|
|
14503
|
+
* // ```
|
|
14504
|
+
* // - Install the npm module by running:
|
|
14505
|
+
* // ```sh
|
|
14506
|
+
* // $ npm install googleapis
|
|
14507
|
+
* // ```
|
|
14508
|
+
*
|
|
14509
|
+
* const {google} = require('googleapis');
|
|
14510
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
14511
|
+
*
|
|
14512
|
+
* async function main() {
|
|
14513
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14514
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14515
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
14516
|
+
* });
|
|
14517
|
+
*
|
|
14518
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14519
|
+
* const authClient = await auth.getClient();
|
|
14520
|
+
* google.options({auth: authClient});
|
|
14521
|
+
*
|
|
14522
|
+
* // Do the magic
|
|
14523
|
+
* const res =
|
|
14524
|
+
* await securitycenter.projects.eventThreatDetectionSettings.calculate({
|
|
14525
|
+
* // Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/eventThreatDetectionSettings * folders/{folder\}/eventThreatDetectionSettings * projects/{project\}/eventThreatDetectionSettings
|
|
14526
|
+
* name: 'projects/my-project/eventThreatDetectionSettings',
|
|
14527
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
14528
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
14529
|
+
* });
|
|
14530
|
+
* console.log(res.data);
|
|
14531
|
+
*
|
|
14532
|
+
* // Example response
|
|
14533
|
+
* // {
|
|
14534
|
+
* // "modules": {},
|
|
14535
|
+
* // "name": "my_name",
|
|
14536
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14537
|
+
* // "updateTime": "my_updateTime"
|
|
14538
|
+
* // }
|
|
14539
|
+
* }
|
|
14540
|
+
*
|
|
14541
|
+
* main().catch(e => {
|
|
14542
|
+
* console.error(e);
|
|
14543
|
+
* throw e;
|
|
14544
|
+
* });
|
|
14545
|
+
*
|
|
14546
|
+
* ```
|
|
11326
14547
|
*
|
|
11327
14548
|
* @param params - Parameters for request
|
|
11328
14549
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11455,6 +14676,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
11455
14676
|
|
|
11456
14677
|
/**
|
|
11457
14678
|
* Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.
|
|
14679
|
+
* @example
|
|
14680
|
+
* ```js
|
|
14681
|
+
* // Before running the sample:
|
|
14682
|
+
* // - Enable the API at:
|
|
14683
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
14684
|
+
* // - Login into gcloud by running:
|
|
14685
|
+
* // ```sh
|
|
14686
|
+
* // $ gcloud auth application-default login
|
|
14687
|
+
* // ```
|
|
14688
|
+
* // - Install the npm module by running:
|
|
14689
|
+
* // ```sh
|
|
14690
|
+
* // $ npm install googleapis
|
|
14691
|
+
* // ```
|
|
14692
|
+
*
|
|
14693
|
+
* const {google} = require('googleapis');
|
|
14694
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
14695
|
+
*
|
|
14696
|
+
* async function main() {
|
|
14697
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14698
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14699
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
14700
|
+
* });
|
|
14701
|
+
*
|
|
14702
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14703
|
+
* const authClient = await auth.getClient();
|
|
14704
|
+
* google.options({auth: authClient});
|
|
14705
|
+
*
|
|
14706
|
+
* // Do the magic
|
|
14707
|
+
* const res =
|
|
14708
|
+
* await securitycenter.projects.locations.clusters.getContainerThreatDetectionSettings(
|
|
14709
|
+
* {
|
|
14710
|
+
* // Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
14711
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/containerThreatDetectionSettings',
|
|
14712
|
+
* },
|
|
14713
|
+
* );
|
|
14714
|
+
* console.log(res.data);
|
|
14715
|
+
*
|
|
14716
|
+
* // Example response
|
|
14717
|
+
* // {
|
|
14718
|
+
* // "modules": {},
|
|
14719
|
+
* // "name": "my_name",
|
|
14720
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
14721
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14722
|
+
* // "updateTime": "my_updateTime"
|
|
14723
|
+
* // }
|
|
14724
|
+
* }
|
|
14725
|
+
*
|
|
14726
|
+
* main().catch(e => {
|
|
14727
|
+
* console.error(e);
|
|
14728
|
+
* throw e;
|
|
14729
|
+
* });
|
|
14730
|
+
*
|
|
14731
|
+
* ```
|
|
11458
14732
|
*
|
|
11459
14733
|
* @param params - Parameters for request
|
|
11460
14734
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11555,6 +14829,73 @@ export namespace securitycenter_v1beta2 {
|
|
|
11555
14829
|
|
|
11556
14830
|
/**
|
|
11557
14831
|
* Update the ContainerThreatDetectionSettings resource.
|
|
14832
|
+
* @example
|
|
14833
|
+
* ```js
|
|
14834
|
+
* // Before running the sample:
|
|
14835
|
+
* // - Enable the API at:
|
|
14836
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
14837
|
+
* // - Login into gcloud by running:
|
|
14838
|
+
* // ```sh
|
|
14839
|
+
* // $ gcloud auth application-default login
|
|
14840
|
+
* // ```
|
|
14841
|
+
* // - Install the npm module by running:
|
|
14842
|
+
* // ```sh
|
|
14843
|
+
* // $ npm install googleapis
|
|
14844
|
+
* // ```
|
|
14845
|
+
*
|
|
14846
|
+
* const {google} = require('googleapis');
|
|
14847
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
14848
|
+
*
|
|
14849
|
+
* async function main() {
|
|
14850
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14851
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14852
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
14853
|
+
* });
|
|
14854
|
+
*
|
|
14855
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14856
|
+
* const authClient = await auth.getClient();
|
|
14857
|
+
* google.options({auth: authClient});
|
|
14858
|
+
*
|
|
14859
|
+
* // Do the magic
|
|
14860
|
+
* const res =
|
|
14861
|
+
* await securitycenter.projects.locations.clusters.updateContainerThreatDetectionSettings(
|
|
14862
|
+
* {
|
|
14863
|
+
* // Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
14864
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/containerThreatDetectionSettings',
|
|
14865
|
+
* // The list of fields to be updated.
|
|
14866
|
+
* updateMask: 'placeholder-value',
|
|
14867
|
+
*
|
|
14868
|
+
* // Request body metadata
|
|
14869
|
+
* requestBody: {
|
|
14870
|
+
* // request body parameters
|
|
14871
|
+
* // {
|
|
14872
|
+
* // "modules": {},
|
|
14873
|
+
* // "name": "my_name",
|
|
14874
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
14875
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14876
|
+
* // "updateTime": "my_updateTime"
|
|
14877
|
+
* // }
|
|
14878
|
+
* },
|
|
14879
|
+
* },
|
|
14880
|
+
* );
|
|
14881
|
+
* console.log(res.data);
|
|
14882
|
+
*
|
|
14883
|
+
* // Example response
|
|
14884
|
+
* // {
|
|
14885
|
+
* // "modules": {},
|
|
14886
|
+
* // "name": "my_name",
|
|
14887
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
14888
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
14889
|
+
* // "updateTime": "my_updateTime"
|
|
14890
|
+
* // }
|
|
14891
|
+
* }
|
|
14892
|
+
*
|
|
14893
|
+
* main().catch(e => {
|
|
14894
|
+
* console.error(e);
|
|
14895
|
+
* throw e;
|
|
14896
|
+
* });
|
|
14897
|
+
*
|
|
14898
|
+
* ```
|
|
11558
14899
|
*
|
|
11559
14900
|
* @param params - Parameters for request
|
|
11560
14901
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11686,6 +15027,61 @@ export namespace securitycenter_v1beta2 {
|
|
|
11686
15027
|
|
|
11687
15028
|
/**
|
|
11688
15029
|
* Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
15030
|
+
* @example
|
|
15031
|
+
* ```js
|
|
15032
|
+
* // Before running the sample:
|
|
15033
|
+
* // - Enable the API at:
|
|
15034
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
15035
|
+
* // - Login into gcloud by running:
|
|
15036
|
+
* // ```sh
|
|
15037
|
+
* // $ gcloud auth application-default login
|
|
15038
|
+
* // ```
|
|
15039
|
+
* // - Install the npm module by running:
|
|
15040
|
+
* // ```sh
|
|
15041
|
+
* // $ npm install googleapis
|
|
15042
|
+
* // ```
|
|
15043
|
+
*
|
|
15044
|
+
* const {google} = require('googleapis');
|
|
15045
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
15046
|
+
*
|
|
15047
|
+
* async function main() {
|
|
15048
|
+
* const auth = new google.auth.GoogleAuth({
|
|
15049
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
15050
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
15051
|
+
* });
|
|
15052
|
+
*
|
|
15053
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
15054
|
+
* const authClient = await auth.getClient();
|
|
15055
|
+
* google.options({auth: authClient});
|
|
15056
|
+
*
|
|
15057
|
+
* // Do the magic
|
|
15058
|
+
* const res =
|
|
15059
|
+
* await securitycenter.projects.locations.clusters.containerThreatDetectionSettings.calculate(
|
|
15060
|
+
* {
|
|
15061
|
+
* // Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/containerThreatDetectionSettings * folders/{folder\}/containerThreatDetectionSettings * projects/{project\}/containerThreatDetectionSettings * projects/{project\}/locations/{location\}/clusters/{cluster\}/containerThreatDetectionSettings
|
|
15062
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/containerThreatDetectionSettings',
|
|
15063
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
15064
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
15065
|
+
* },
|
|
15066
|
+
* );
|
|
15067
|
+
* console.log(res.data);
|
|
15068
|
+
*
|
|
15069
|
+
* // Example response
|
|
15070
|
+
* // {
|
|
15071
|
+
* // "modules": {},
|
|
15072
|
+
* // "name": "my_name",
|
|
15073
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
15074
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
15075
|
+
* // "updateTime": "my_updateTime"
|
|
15076
|
+
* // }
|
|
15077
|
+
* }
|
|
15078
|
+
*
|
|
15079
|
+
* main().catch(e => {
|
|
15080
|
+
* console.error(e);
|
|
15081
|
+
* throw e;
|
|
15082
|
+
* });
|
|
15083
|
+
*
|
|
15084
|
+
* ```
|
|
11689
15085
|
*
|
|
11690
15086
|
* @param params - Parameters for request
|
|
11691
15087
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11808,6 +15204,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
11808
15204
|
|
|
11809
15205
|
/**
|
|
11810
15206
|
* Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
15207
|
+
* @example
|
|
15208
|
+
* ```js
|
|
15209
|
+
* // Before running the sample:
|
|
15210
|
+
* // - Enable the API at:
|
|
15211
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
15212
|
+
* // - Login into gcloud by running:
|
|
15213
|
+
* // ```sh
|
|
15214
|
+
* // $ gcloud auth application-default login
|
|
15215
|
+
* // ```
|
|
15216
|
+
* // - Install the npm module by running:
|
|
15217
|
+
* // ```sh
|
|
15218
|
+
* // $ npm install googleapis
|
|
15219
|
+
* // ```
|
|
15220
|
+
*
|
|
15221
|
+
* const {google} = require('googleapis');
|
|
15222
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
15223
|
+
*
|
|
15224
|
+
* async function main() {
|
|
15225
|
+
* const auth = new google.auth.GoogleAuth({
|
|
15226
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
15227
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
15228
|
+
* });
|
|
15229
|
+
*
|
|
15230
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
15231
|
+
* const authClient = await auth.getClient();
|
|
15232
|
+
* google.options({auth: authClient});
|
|
15233
|
+
*
|
|
15234
|
+
* // Do the magic
|
|
15235
|
+
* const res =
|
|
15236
|
+
* await securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate(
|
|
15237
|
+
* {
|
|
15238
|
+
* // Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization\}/rapidVulnerabilityDetectionSettings * folders/{folder\}/rapidVulnerabilityDetectionSettings * projects/{project\}/rapidVulnerabilityDetectionSettings
|
|
15239
|
+
* name: 'projects/my-project/rapidVulnerabilityDetectionSettings',
|
|
15240
|
+
* },
|
|
15241
|
+
* );
|
|
15242
|
+
* console.log(res.data);
|
|
15243
|
+
*
|
|
15244
|
+
* // Example response
|
|
15245
|
+
* // {
|
|
15246
|
+
* // "modules": {},
|
|
15247
|
+
* // "name": "my_name",
|
|
15248
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
15249
|
+
* // "updateTime": "my_updateTime"
|
|
15250
|
+
* // }
|
|
15251
|
+
* }
|
|
15252
|
+
*
|
|
15253
|
+
* main().catch(e => {
|
|
15254
|
+
* console.error(e);
|
|
15255
|
+
* throw e;
|
|
15256
|
+
* });
|
|
15257
|
+
*
|
|
15258
|
+
* ```
|
|
11811
15259
|
*
|
|
11812
15260
|
* @param params - Parameters for request
|
|
11813
15261
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -11926,6 +15374,59 @@ export namespace securitycenter_v1beta2 {
|
|
|
11926
15374
|
|
|
11927
15375
|
/**
|
|
11928
15376
|
* Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
15377
|
+
* @example
|
|
15378
|
+
* ```js
|
|
15379
|
+
* // Before running the sample:
|
|
15380
|
+
* // - Enable the API at:
|
|
15381
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
15382
|
+
* // - Login into gcloud by running:
|
|
15383
|
+
* // ```sh
|
|
15384
|
+
* // $ gcloud auth application-default login
|
|
15385
|
+
* // ```
|
|
15386
|
+
* // - Install the npm module by running:
|
|
15387
|
+
* // ```sh
|
|
15388
|
+
* // $ npm install googleapis
|
|
15389
|
+
* // ```
|
|
15390
|
+
*
|
|
15391
|
+
* const {google} = require('googleapis');
|
|
15392
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
15393
|
+
*
|
|
15394
|
+
* async function main() {
|
|
15395
|
+
* const auth = new google.auth.GoogleAuth({
|
|
15396
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
15397
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
15398
|
+
* });
|
|
15399
|
+
*
|
|
15400
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
15401
|
+
* const authClient = await auth.getClient();
|
|
15402
|
+
* google.options({auth: authClient});
|
|
15403
|
+
*
|
|
15404
|
+
* // Do the magic
|
|
15405
|
+
* const res =
|
|
15406
|
+
* await securitycenter.projects.securityHealthAnalyticsSettings.calculate({
|
|
15407
|
+
* // Required. The name of the SecurityHealthAnalyticsSettings to calculate. Formats: * organizations/{organization\}/securityHealthAnalyticsSettings * folders/{folder\}/securityHealthAnalyticsSettings * projects/{project\}/securityHealthAnalyticsSettings
|
|
15408
|
+
* name: 'projects/my-project/securityHealthAnalyticsSettings',
|
|
15409
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
15410
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
15411
|
+
* });
|
|
15412
|
+
* console.log(res.data);
|
|
15413
|
+
*
|
|
15414
|
+
* // Example response
|
|
15415
|
+
* // {
|
|
15416
|
+
* // "modules": {},
|
|
15417
|
+
* // "name": "my_name",
|
|
15418
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
15419
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
15420
|
+
* // "updateTime": "my_updateTime"
|
|
15421
|
+
* // }
|
|
15422
|
+
* }
|
|
15423
|
+
*
|
|
15424
|
+
* main().catch(e => {
|
|
15425
|
+
* console.error(e);
|
|
15426
|
+
* throw e;
|
|
15427
|
+
* });
|
|
15428
|
+
*
|
|
15429
|
+
* ```
|
|
11929
15430
|
*
|
|
11930
15431
|
* @param params - Parameters for request
|
|
11931
15432
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -12044,6 +15545,61 @@ export namespace securitycenter_v1beta2 {
|
|
|
12044
15545
|
|
|
12045
15546
|
/**
|
|
12046
15547
|
* Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
15548
|
+
* @example
|
|
15549
|
+
* ```js
|
|
15550
|
+
* // Before running the sample:
|
|
15551
|
+
* // - Enable the API at:
|
|
15552
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
15553
|
+
* // - Login into gcloud by running:
|
|
15554
|
+
* // ```sh
|
|
15555
|
+
* // $ gcloud auth application-default login
|
|
15556
|
+
* // ```
|
|
15557
|
+
* // - Install the npm module by running:
|
|
15558
|
+
* // ```sh
|
|
15559
|
+
* // $ npm install googleapis
|
|
15560
|
+
* // ```
|
|
15561
|
+
*
|
|
15562
|
+
* const {google} = require('googleapis');
|
|
15563
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
15564
|
+
*
|
|
15565
|
+
* async function main() {
|
|
15566
|
+
* const auth = new google.auth.GoogleAuth({
|
|
15567
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
15568
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
15569
|
+
* });
|
|
15570
|
+
*
|
|
15571
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
15572
|
+
* const authClient = await auth.getClient();
|
|
15573
|
+
* google.options({auth: authClient});
|
|
15574
|
+
*
|
|
15575
|
+
* // Do the magic
|
|
15576
|
+
* const res =
|
|
15577
|
+
* await securitycenter.projects.virtualMachineThreatDetectionSettings.calculate(
|
|
15578
|
+
* {
|
|
15579
|
+
* // Required. The name of the VirtualMachineThreatDetectionSettings to calculate. Formats: * organizations/{organization\}/virtualMachineThreatDetectionSettings * folders/{folder\}/virtualMachineThreatDetectionSettings * projects/{project\}/virtualMachineThreatDetectionSettings
|
|
15580
|
+
* name: 'projects/my-project/virtualMachineThreatDetectionSettings',
|
|
15581
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
15582
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
15583
|
+
* },
|
|
15584
|
+
* );
|
|
15585
|
+
* console.log(res.data);
|
|
15586
|
+
*
|
|
15587
|
+
* // Example response
|
|
15588
|
+
* // {
|
|
15589
|
+
* // "modules": {},
|
|
15590
|
+
* // "name": "my_name",
|
|
15591
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
15592
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
15593
|
+
* // "updateTime": "my_updateTime"
|
|
15594
|
+
* // }
|
|
15595
|
+
* }
|
|
15596
|
+
*
|
|
15597
|
+
* main().catch(e => {
|
|
15598
|
+
* console.error(e);
|
|
15599
|
+
* throw e;
|
|
15600
|
+
* });
|
|
15601
|
+
*
|
|
15602
|
+
* ```
|
|
12047
15603
|
*
|
|
12048
15604
|
* @param params - Parameters for request
|
|
12049
15605
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -12166,6 +15722,58 @@ export namespace securitycenter_v1beta2 {
|
|
|
12166
15722
|
|
|
12167
15723
|
/**
|
|
12168
15724
|
* Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.
|
|
15725
|
+
* @example
|
|
15726
|
+
* ```js
|
|
15727
|
+
* // Before running the sample:
|
|
15728
|
+
* // - Enable the API at:
|
|
15729
|
+
* // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
|
|
15730
|
+
* // - Login into gcloud by running:
|
|
15731
|
+
* // ```sh
|
|
15732
|
+
* // $ gcloud auth application-default login
|
|
15733
|
+
* // ```
|
|
15734
|
+
* // - Install the npm module by running:
|
|
15735
|
+
* // ```sh
|
|
15736
|
+
* // $ npm install googleapis
|
|
15737
|
+
* // ```
|
|
15738
|
+
*
|
|
15739
|
+
* const {google} = require('googleapis');
|
|
15740
|
+
* const securitycenter = google.securitycenter('v1beta2');
|
|
15741
|
+
*
|
|
15742
|
+
* async function main() {
|
|
15743
|
+
* const auth = new google.auth.GoogleAuth({
|
|
15744
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
15745
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
15746
|
+
* });
|
|
15747
|
+
*
|
|
15748
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
15749
|
+
* const authClient = await auth.getClient();
|
|
15750
|
+
* google.options({auth: authClient});
|
|
15751
|
+
*
|
|
15752
|
+
* // Do the magic
|
|
15753
|
+
* const res =
|
|
15754
|
+
* await securitycenter.projects.webSecurityScannerSettings.calculate({
|
|
15755
|
+
* // Required. The name of the WebSecurityScannerSettings to calculate. Formats: * organizations/{organization\}/webSecurityScannerSettings * folders/{folder\}/webSecurityScannerSettings * projects/{project\}/webSecurityScannerSettings
|
|
15756
|
+
* name: 'projects/my-project/webSecurityScannerSettings',
|
|
15757
|
+
* // Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.
|
|
15758
|
+
* showEligibleModulesOnly: 'placeholder-value',
|
|
15759
|
+
* });
|
|
15760
|
+
* console.log(res.data);
|
|
15761
|
+
*
|
|
15762
|
+
* // Example response
|
|
15763
|
+
* // {
|
|
15764
|
+
* // "modules": {},
|
|
15765
|
+
* // "name": "my_name",
|
|
15766
|
+
* // "serviceEnablementState": "my_serviceEnablementState",
|
|
15767
|
+
* // "updateTime": "my_updateTime"
|
|
15768
|
+
* // }
|
|
15769
|
+
* }
|
|
15770
|
+
*
|
|
15771
|
+
* main().catch(e => {
|
|
15772
|
+
* console.error(e);
|
|
15773
|
+
* throw e;
|
|
15774
|
+
* });
|
|
15775
|
+
*
|
|
15776
|
+
* ```
|
|
12169
15777
|
*
|
|
12170
15778
|
* @param params - Parameters for request
|
|
12171
15779
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|