@googleapis/securityposture 1.0.1 → 2.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/build/v1.d.ts CHANGED
@@ -929,6 +929,56 @@ export declare namespace securityposture_v1 {
929
929
  constructor(context: APIRequestContext);
930
930
  /**
931
931
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
932
+ * @example
933
+ * ```js
934
+ * // Before running the sample:
935
+ * // - Enable the API at:
936
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
937
+ * // - Login into gcloud by running:
938
+ * // ```sh
939
+ * // $ gcloud auth application-default login
940
+ * // ```
941
+ * // - Install the npm module by running:
942
+ * // ```sh
943
+ * // $ npm install googleapis
944
+ * // ```
945
+ *
946
+ * const {google} = require('googleapis');
947
+ * const securityposture = google.securityposture('v1');
948
+ *
949
+ * async function main() {
950
+ * const auth = new google.auth.GoogleAuth({
951
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
952
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
953
+ * });
954
+ *
955
+ * // Acquire an auth client, and bind it to all future calls
956
+ * const authClient = await auth.getClient();
957
+ * google.options({auth: authClient});
958
+ *
959
+ * // Do the magic
960
+ * const res = await securityposture.organizations.locations.operations.cancel({
961
+ * // The name of the operation resource to be cancelled.
962
+ * name: 'organizations/my-organization/locations/my-location/operations/my-operation',
963
+ *
964
+ * // Request body metadata
965
+ * requestBody: {
966
+ * // request body parameters
967
+ * // {}
968
+ * },
969
+ * });
970
+ * console.log(res.data);
971
+ *
972
+ * // Example response
973
+ * // {}
974
+ * }
975
+ *
976
+ * main().catch(e => {
977
+ * console.error(e);
978
+ * throw e;
979
+ * });
980
+ *
981
+ * ```
932
982
  *
933
983
  * @param params - Parameters for request
934
984
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -943,6 +993,50 @@ export declare namespace securityposture_v1 {
943
993
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
944
994
  /**
945
995
  * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
996
+ * @example
997
+ * ```js
998
+ * // Before running the sample:
999
+ * // - Enable the API at:
1000
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1001
+ * // - Login into gcloud by running:
1002
+ * // ```sh
1003
+ * // $ gcloud auth application-default login
1004
+ * // ```
1005
+ * // - Install the npm module by running:
1006
+ * // ```sh
1007
+ * // $ npm install googleapis
1008
+ * // ```
1009
+ *
1010
+ * const {google} = require('googleapis');
1011
+ * const securityposture = google.securityposture('v1');
1012
+ *
1013
+ * async function main() {
1014
+ * const auth = new google.auth.GoogleAuth({
1015
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1016
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1017
+ * });
1018
+ *
1019
+ * // Acquire an auth client, and bind it to all future calls
1020
+ * const authClient = await auth.getClient();
1021
+ * google.options({auth: authClient});
1022
+ *
1023
+ * // Do the magic
1024
+ * const res = await securityposture.organizations.locations.operations.delete({
1025
+ * // The name of the operation resource to be deleted.
1026
+ * name: 'organizations/my-organization/locations/my-location/operations/my-operation',
1027
+ * });
1028
+ * console.log(res.data);
1029
+ *
1030
+ * // Example response
1031
+ * // {}
1032
+ * }
1033
+ *
1034
+ * main().catch(e => {
1035
+ * console.error(e);
1036
+ * throw e;
1037
+ * });
1038
+ *
1039
+ * ```
946
1040
  *
947
1041
  * @param params - Parameters for request
948
1042
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -957,6 +1051,56 @@ export declare namespace securityposture_v1 {
957
1051
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
958
1052
  /**
959
1053
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
1054
+ * @example
1055
+ * ```js
1056
+ * // Before running the sample:
1057
+ * // - Enable the API at:
1058
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1059
+ * // - Login into gcloud by running:
1060
+ * // ```sh
1061
+ * // $ gcloud auth application-default login
1062
+ * // ```
1063
+ * // - Install the npm module by running:
1064
+ * // ```sh
1065
+ * // $ npm install googleapis
1066
+ * // ```
1067
+ *
1068
+ * const {google} = require('googleapis');
1069
+ * const securityposture = google.securityposture('v1');
1070
+ *
1071
+ * async function main() {
1072
+ * const auth = new google.auth.GoogleAuth({
1073
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1074
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1075
+ * });
1076
+ *
1077
+ * // Acquire an auth client, and bind it to all future calls
1078
+ * const authClient = await auth.getClient();
1079
+ * google.options({auth: authClient});
1080
+ *
1081
+ * // Do the magic
1082
+ * const res = await securityposture.organizations.locations.operations.get({
1083
+ * // The name of the operation resource.
1084
+ * name: 'organizations/my-organization/locations/my-location/operations/my-operation',
1085
+ * });
1086
+ * console.log(res.data);
1087
+ *
1088
+ * // Example response
1089
+ * // {
1090
+ * // "done": false,
1091
+ * // "error": {},
1092
+ * // "metadata": {},
1093
+ * // "name": "my_name",
1094
+ * // "response": {}
1095
+ * // }
1096
+ * }
1097
+ *
1098
+ * main().catch(e => {
1099
+ * console.error(e);
1100
+ * throw e;
1101
+ * });
1102
+ *
1103
+ * ```
960
1104
  *
961
1105
  * @param params - Parameters for request
962
1106
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -971,6 +1115,59 @@ export declare namespace securityposture_v1 {
971
1115
  get(callback: BodyResponseCallback<Schema$Operation>): void;
972
1116
  /**
973
1117
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
1118
+ * @example
1119
+ * ```js
1120
+ * // Before running the sample:
1121
+ * // - Enable the API at:
1122
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1123
+ * // - Login into gcloud by running:
1124
+ * // ```sh
1125
+ * // $ gcloud auth application-default login
1126
+ * // ```
1127
+ * // - Install the npm module by running:
1128
+ * // ```sh
1129
+ * // $ npm install googleapis
1130
+ * // ```
1131
+ *
1132
+ * const {google} = require('googleapis');
1133
+ * const securityposture = google.securityposture('v1');
1134
+ *
1135
+ * async function main() {
1136
+ * const auth = new google.auth.GoogleAuth({
1137
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1138
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1139
+ * });
1140
+ *
1141
+ * // Acquire an auth client, and bind it to all future calls
1142
+ * const authClient = await auth.getClient();
1143
+ * google.options({auth: authClient});
1144
+ *
1145
+ * // Do the magic
1146
+ * const res = await securityposture.organizations.locations.operations.list({
1147
+ * // The standard list filter.
1148
+ * filter: 'placeholder-value',
1149
+ * // The name of the operation's parent resource.
1150
+ * name: 'organizations/my-organization/locations/my-location',
1151
+ * // The standard list page size.
1152
+ * pageSize: 'placeholder-value',
1153
+ * // The standard list page token.
1154
+ * pageToken: 'placeholder-value',
1155
+ * });
1156
+ * console.log(res.data);
1157
+ *
1158
+ * // Example response
1159
+ * // {
1160
+ * // "nextPageToken": "my_nextPageToken",
1161
+ * // "operations": []
1162
+ * // }
1163
+ * }
1164
+ *
1165
+ * main().catch(e => {
1166
+ * console.error(e);
1167
+ * throw e;
1168
+ * });
1169
+ *
1170
+ * ```
974
1171
  *
975
1172
  * @param params - Parameters for request
976
1173
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1029,6 +1226,81 @@ export declare namespace securityposture_v1 {
1029
1226
  constructor(context: APIRequestContext);
1030
1227
  /**
1031
1228
  * Creates a new PostureDeployment in a given project and location.
1229
+ * @example
1230
+ * ```js
1231
+ * // Before running the sample:
1232
+ * // - Enable the API at:
1233
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1234
+ * // - Login into gcloud by running:
1235
+ * // ```sh
1236
+ * // $ gcloud auth application-default login
1237
+ * // ```
1238
+ * // - Install the npm module by running:
1239
+ * // ```sh
1240
+ * // $ npm install googleapis
1241
+ * // ```
1242
+ *
1243
+ * const {google} = require('googleapis');
1244
+ * const securityposture = google.securityposture('v1');
1245
+ *
1246
+ * async function main() {
1247
+ * const auth = new google.auth.GoogleAuth({
1248
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1249
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1250
+ * });
1251
+ *
1252
+ * // Acquire an auth client, and bind it to all future calls
1253
+ * const authClient = await auth.getClient();
1254
+ * google.options({auth: authClient});
1255
+ *
1256
+ * // Do the magic
1257
+ * const res =
1258
+ * await securityposture.organizations.locations.postureDeployments.create({
1259
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
1260
+ * parent: 'organizations/my-organization/locations/my-location',
1261
+ * // Required. An identifier for the posture deployment.
1262
+ * postureDeploymentId: 'placeholder-value',
1263
+ *
1264
+ * // Request body metadata
1265
+ * requestBody: {
1266
+ * // request body parameters
1267
+ * // {
1268
+ * // "annotations": {},
1269
+ * // "categories": [],
1270
+ * // "createTime": "my_createTime",
1271
+ * // "description": "my_description",
1272
+ * // "desiredPostureId": "my_desiredPostureId",
1273
+ * // "desiredPostureRevisionId": "my_desiredPostureRevisionId",
1274
+ * // "etag": "my_etag",
1275
+ * // "failureMessage": "my_failureMessage",
1276
+ * // "name": "my_name",
1277
+ * // "postureId": "my_postureId",
1278
+ * // "postureRevisionId": "my_postureRevisionId",
1279
+ * // "reconciling": false,
1280
+ * // "state": "my_state",
1281
+ * // "targetResource": "my_targetResource",
1282
+ * // "updateTime": "my_updateTime"
1283
+ * // }
1284
+ * },
1285
+ * });
1286
+ * console.log(res.data);
1287
+ *
1288
+ * // Example response
1289
+ * // {
1290
+ * // "done": false,
1291
+ * // "error": {},
1292
+ * // "metadata": {},
1293
+ * // "name": "my_name",
1294
+ * // "response": {}
1295
+ * // }
1296
+ * }
1297
+ *
1298
+ * main().catch(e => {
1299
+ * console.error(e);
1300
+ * throw e;
1301
+ * });
1302
+ *
1303
+ * ```
1032
1304
  *
1033
1305
  * @param params - Parameters for request
1034
1306
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1043,6 +1315,59 @@ export declare namespace securityposture_v1 {
1043
1315
  create(callback: BodyResponseCallback<Schema$Operation>): void;
1044
1316
  /**
1045
1317
  * Deletes a PostureDeployment.
1318
+ * @example
1319
+ * ```js
1320
+ * // Before running the sample:
1321
+ * // - Enable the API at:
1322
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1323
+ * // - Login into gcloud by running:
1324
+ * // ```sh
1325
+ * // $ gcloud auth application-default login
1326
+ * // ```
1327
+ * // - Install the npm module by running:
1328
+ * // ```sh
1329
+ * // $ npm install googleapis
1330
+ * // ```
1331
+ *
1332
+ * const {google} = require('googleapis');
1333
+ * const securityposture = google.securityposture('v1');
1334
+ *
1335
+ * async function main() {
1336
+ * const auth = new google.auth.GoogleAuth({
1337
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1338
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1339
+ * });
1340
+ *
1341
+ * // Acquire an auth client, and bind it to all future calls
1342
+ * const authClient = await auth.getClient();
1343
+ * google.options({auth: authClient});
1344
+ *
1345
+ * // Do the magic
1346
+ * const res =
1347
+ * await securityposture.organizations.locations.postureDeployments.delete({
1348
+ * // Optional. An opaque identifier for the current version of the posture deployment. If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an ABORTED error. If you omit this value, then the posture deployment is deleted regardless of its current `etag` value.
1349
+ * etag: 'placeholder-value',
1350
+ * // Required. The name of the posture deployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{posture_id\}`.
1351
+ * name: 'organizations/my-organization/locations/my-location/postureDeployments/my-postureDeployment',
1352
+ * });
1353
+ * console.log(res.data);
1354
+ *
1355
+ * // Example response
1356
+ * // {
1357
+ * // "done": false,
1358
+ * // "error": {},
1359
+ * // "metadata": {},
1360
+ * // "name": "my_name",
1361
+ * // "response": {}
1362
+ * // }
1363
+ * }
1364
+ *
1365
+ * main().catch(e => {
1366
+ * console.error(e);
1367
+ * throw e;
1368
+ * });
1369
+ *
1370
+ * ```
1046
1371
  *
1047
1372
  * @param params - Parameters for request
1048
1373
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1057,6 +1382,67 @@ export declare namespace securityposture_v1 {
1057
1382
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
1058
1383
  /**
1059
1384
  * Gets details for a PostureDeployment.
1385
+ * @example
1386
+ * ```js
1387
+ * // Before running the sample:
1388
+ * // - Enable the API at:
1389
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1390
+ * // - Login into gcloud by running:
1391
+ * // ```sh
1392
+ * // $ gcloud auth application-default login
1393
+ * // ```
1394
+ * // - Install the npm module by running:
1395
+ * // ```sh
1396
+ * // $ npm install googleapis
1397
+ * // ```
1398
+ *
1399
+ * const {google} = require('googleapis');
1400
+ * const securityposture = google.securityposture('v1');
1401
+ *
1402
+ * async function main() {
1403
+ * const auth = new google.auth.GoogleAuth({
1404
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1405
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1406
+ * });
1407
+ *
1408
+ * // Acquire an auth client, and bind it to all future calls
1409
+ * const authClient = await auth.getClient();
1410
+ * google.options({auth: authClient});
1411
+ *
1412
+ * // Do the magic
1413
+ * const res =
1414
+ * await securityposture.organizations.locations.postureDeployments.get({
1415
+ * // Required. The name of the PostureDeployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{posture_deployment_id\}`.
1416
+ * name: 'organizations/my-organization/locations/my-location/postureDeployments/my-postureDeployment',
1417
+ * });
1418
+ * console.log(res.data);
1419
+ *
1420
+ * // Example response
1421
+ * // {
1422
+ * // "annotations": {},
1423
+ * // "categories": [],
1424
+ * // "createTime": "my_createTime",
1425
+ * // "description": "my_description",
1426
+ * // "desiredPostureId": "my_desiredPostureId",
1427
+ * // "desiredPostureRevisionId": "my_desiredPostureRevisionId",
1428
+ * // "etag": "my_etag",
1429
+ * // "failureMessage": "my_failureMessage",
1430
+ * // "name": "my_name",
1431
+ * // "postureId": "my_postureId",
1432
+ * // "postureRevisionId": "my_postureRevisionId",
1433
+ * // "reconciling": false,
1434
+ * // "state": "my_state",
1435
+ * // "targetResource": "my_targetResource",
1436
+ * // "updateTime": "my_updateTime"
1437
+ * // }
1438
+ * }
1439
+ *
1440
+ * main().catch(e => {
1441
+ * console.error(e);
1442
+ * throw e;
1443
+ * });
1444
+ *
1445
+ * ```
1060
1446
  *
1061
1447
  * @param params - Parameters for request
1062
1448
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1071,6 +1457,61 @@ export declare namespace securityposture_v1 {
1071
1457
  get(callback: BodyResponseCallback<Schema$PostureDeployment>): void;
1072
1458
  /**
1073
1459
  * Lists every PostureDeployment in a project and location.
1460
+ * @example
1461
+ * ```js
1462
+ * // Before running the sample:
1463
+ * // - Enable the API at:
1464
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1465
+ * // - Login into gcloud by running:
1466
+ * // ```sh
1467
+ * // $ gcloud auth application-default login
1468
+ * // ```
1469
+ * // - Install the npm module by running:
1470
+ * // ```sh
1471
+ * // $ npm install googleapis
1472
+ * // ```
1473
+ *
1474
+ * const {google} = require('googleapis');
1475
+ * const securityposture = google.securityposture('v1');
1476
+ *
1477
+ * async function main() {
1478
+ * const auth = new google.auth.GoogleAuth({
1479
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1480
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1481
+ * });
1482
+ *
1483
+ * // Acquire an auth client, and bind it to all future calls
1484
+ * const authClient = await auth.getClient();
1485
+ * google.options({auth: authClient});
1486
+ *
1487
+ * // Do the magic
1488
+ * const res =
1489
+ * await securityposture.organizations.locations.postureDeployments.list({
1490
+ * // Optional. A filter to apply to the list of postures, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
1491
+ * filter: 'placeholder-value',
1492
+ * // Optional. The maximum number of posture deployments to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
1493
+ * pageSize: 'placeholder-value',
1494
+ * // Optional. A pagination token returned from a previous request to list posture deployments. Provide this token to retrieve the next page of results.
1495
+ * pageToken: 'placeholder-value',
1496
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
1497
+ * parent: 'organizations/my-organization/locations/my-location',
1498
+ * });
1499
+ * console.log(res.data);
1500
+ *
1501
+ * // Example response
1502
+ * // {
1503
+ * // "nextPageToken": "my_nextPageToken",
1504
+ * // "postureDeployments": [],
1505
+ * // "unreachable": []
1506
+ * // }
1507
+ * }
1508
+ *
1509
+ * main().catch(e => {
1510
+ * console.error(e);
1511
+ * throw e;
1512
+ * });
1513
+ *
1514
+ * ```
1074
1515
  *
1075
1516
  * @param params - Parameters for request
1076
1517
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1085,6 +1526,81 @@ export declare namespace securityposture_v1 {
1085
1526
  list(callback: BodyResponseCallback<Schema$ListPostureDeploymentsResponse>): void;
1086
1527
  /**
1087
1528
  * Updates an existing PostureDeployment. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture deployment: 1. Call GetPostureDeployment to get the current version of the deployment. 2. Update the fields in the deployment as needed. 3. Call UpdatePostureDeployment to update the deployment. Ensure that your request includes the `etag` value from the GetPostureDeployment response. **Important:** If you omit the `etag` when you call UpdatePostureDeployment, then the updated deployment unconditionally overwrites the existing deployment.
1529
+ * @example
1530
+ * ```js
1531
+ * // Before running the sample:
1532
+ * // - Enable the API at:
1533
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1534
+ * // - Login into gcloud by running:
1535
+ * // ```sh
1536
+ * // $ gcloud auth application-default login
1537
+ * // ```
1538
+ * // - Install the npm module by running:
1539
+ * // ```sh
1540
+ * // $ npm install googleapis
1541
+ * // ```
1542
+ *
1543
+ * const {google} = require('googleapis');
1544
+ * const securityposture = google.securityposture('v1');
1545
+ *
1546
+ * async function main() {
1547
+ * const auth = new google.auth.GoogleAuth({
1548
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1549
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1550
+ * });
1551
+ *
1552
+ * // Acquire an auth client, and bind it to all future calls
1553
+ * const authClient = await auth.getClient();
1554
+ * google.options({auth: authClient});
1555
+ *
1556
+ * // Do the magic
1557
+ * const res =
1558
+ * await securityposture.organizations.locations.postureDeployments.patch({
1559
+ * // Required. Identifier. The name of the posture deployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{deployment_id\}`.
1560
+ * name: 'organizations/my-organization/locations/my-location/postureDeployments/my-postureDeployment',
1561
+ * // Required. The fields in the PostureDeployment to update. You can update only the following fields: * PostureDeployment.posture_id * PostureDeployment.posture_revision_id
1562
+ * updateMask: 'placeholder-value',
1563
+ *
1564
+ * // Request body metadata
1565
+ * requestBody: {
1566
+ * // request body parameters
1567
+ * // {
1568
+ * // "annotations": {},
1569
+ * // "categories": [],
1570
+ * // "createTime": "my_createTime",
1571
+ * // "description": "my_description",
1572
+ * // "desiredPostureId": "my_desiredPostureId",
1573
+ * // "desiredPostureRevisionId": "my_desiredPostureRevisionId",
1574
+ * // "etag": "my_etag",
1575
+ * // "failureMessage": "my_failureMessage",
1576
+ * // "name": "my_name",
1577
+ * // "postureId": "my_postureId",
1578
+ * // "postureRevisionId": "my_postureRevisionId",
1579
+ * // "reconciling": false,
1580
+ * // "state": "my_state",
1581
+ * // "targetResource": "my_targetResource",
1582
+ * // "updateTime": "my_updateTime"
1583
+ * // }
1584
+ * },
1585
+ * });
1586
+ * console.log(res.data);
1587
+ *
1588
+ * // Example response
1589
+ * // {
1590
+ * // "done": false,
1591
+ * // "error": {},
1592
+ * // "metadata": {},
1593
+ * // "name": "my_name",
1594
+ * // "response": {}
1595
+ * // }
1596
+ * }
1597
+ *
1598
+ * main().catch(e => {
1599
+ * console.error(e);
1600
+ * throw e;
1601
+ * });
1602
+ *
1603
+ * ```
1088
1604
  *
1089
1605
  * @param params - Parameters for request
1090
1606
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1165,6 +1681,76 @@ export declare namespace securityposture_v1 {
1165
1681
  constructor(context: APIRequestContext);
1166
1682
  /**
1167
1683
  * Creates a new Posture.
1684
+ * @example
1685
+ * ```js
1686
+ * // Before running the sample:
1687
+ * // - Enable the API at:
1688
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1689
+ * // - Login into gcloud by running:
1690
+ * // ```sh
1691
+ * // $ gcloud auth application-default login
1692
+ * // ```
1693
+ * // - Install the npm module by running:
1694
+ * // ```sh
1695
+ * // $ npm install googleapis
1696
+ * // ```
1697
+ *
1698
+ * const {google} = require('googleapis');
1699
+ * const securityposture = google.securityposture('v1');
1700
+ *
1701
+ * async function main() {
1702
+ * const auth = new google.auth.GoogleAuth({
1703
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1704
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1705
+ * });
1706
+ *
1707
+ * // Acquire an auth client, and bind it to all future calls
1708
+ * const authClient = await auth.getClient();
1709
+ * google.options({auth: authClient});
1710
+ *
1711
+ * // Do the magic
1712
+ * const res = await securityposture.organizations.locations.postures.create({
1713
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
1714
+ * parent: 'organizations/my-organization/locations/my-location',
1715
+ * // Required. An identifier for the posture.
1716
+ * postureId: 'placeholder-value',
1717
+ *
1718
+ * // Request body metadata
1719
+ * requestBody: {
1720
+ * // request body parameters
1721
+ * // {
1722
+ * // "annotations": {},
1723
+ * // "categories": [],
1724
+ * // "createTime": "my_createTime",
1725
+ * // "description": "my_description",
1726
+ * // "etag": "my_etag",
1727
+ * // "name": "my_name",
1728
+ * // "policySets": [],
1729
+ * // "reconciling": false,
1730
+ * // "revisionId": "my_revisionId",
1731
+ * // "state": "my_state",
1732
+ * // "updateTime": "my_updateTime"
1733
+ * // }
1734
+ * },
1735
+ * });
1736
+ * console.log(res.data);
1737
+ *
1738
+ * // Example response
1739
+ * // {
1740
+ * // "done": false,
1741
+ * // "error": {},
1742
+ * // "metadata": {},
1743
+ * // "name": "my_name",
1744
+ * // "response": {}
1745
+ * // }
1746
+ * }
1747
+ *
1748
+ * main().catch(e => {
1749
+ * console.error(e);
1750
+ * throw e;
1751
+ * });
1752
+ *
1753
+ * ```
1168
1754
  *
1169
1755
  * @param params - Parameters for request
1170
1756
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1179,6 +1765,58 @@ export declare namespace securityposture_v1 {
1179
1765
  create(callback: BodyResponseCallback<Schema$Operation>): void;
1180
1766
  /**
1181
1767
  * Deletes all revisions of a Posture. You can only delete a posture if none of its revisions are deployed.
1768
+ * @example
1769
+ * ```js
1770
+ * // Before running the sample:
1771
+ * // - Enable the API at:
1772
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1773
+ * // - Login into gcloud by running:
1774
+ * // ```sh
1775
+ * // $ gcloud auth application-default login
1776
+ * // ```
1777
+ * // - Install the npm module by running:
1778
+ * // ```sh
1779
+ * // $ npm install googleapis
1780
+ * // ```
1781
+ *
1782
+ * const {google} = require('googleapis');
1783
+ * const securityposture = google.securityposture('v1');
1784
+ *
1785
+ * async function main() {
1786
+ * const auth = new google.auth.GoogleAuth({
1787
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1788
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1789
+ * });
1790
+ *
1791
+ * // Acquire an auth client, and bind it to all future calls
1792
+ * const authClient = await auth.getClient();
1793
+ * google.options({auth: authClient});
1794
+ *
1795
+ * // Do the magic
1796
+ * const res = await securityposture.organizations.locations.postures.delete({
1797
+ * // Optional. An opaque identifier for the current version of the posture. If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an ABORTED error. If you omit this value, then the posture is deleted regardless of its current `etag` value.
1798
+ * etag: 'placeholder-value',
1799
+ * // Required. The name of the Posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
1800
+ * name: 'organizations/my-organization/locations/my-location/postures/my-posture',
1801
+ * });
1802
+ * console.log(res.data);
1803
+ *
1804
+ * // Example response
1805
+ * // {
1806
+ * // "done": false,
1807
+ * // "error": {},
1808
+ * // "metadata": {},
1809
+ * // "name": "my_name",
1810
+ * // "response": {}
1811
+ * // }
1812
+ * }
1813
+ *
1814
+ * main().catch(e => {
1815
+ * console.error(e);
1816
+ * throw e;
1817
+ * });
1818
+ *
1819
+ * ```
1182
1820
  *
1183
1821
  * @param params - Parameters for request
1184
1822
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1193,6 +1831,65 @@ export declare namespace securityposture_v1 {
1193
1831
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
1194
1832
  /**
1195
1833
  * Extracts existing policies from an organization, folder, or project, and applies them to another organization, folder, or project as a Posture. If the other organization, folder, or project already has a posture, then the result of the long-running operation is an ALREADY_EXISTS error.
1834
+ * @example
1835
+ * ```js
1836
+ * // Before running the sample:
1837
+ * // - Enable the API at:
1838
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1839
+ * // - Login into gcloud by running:
1840
+ * // ```sh
1841
+ * // $ gcloud auth application-default login
1842
+ * // ```
1843
+ * // - Install the npm module by running:
1844
+ * // ```sh
1845
+ * // $ npm install googleapis
1846
+ * // ```
1847
+ *
1848
+ * const {google} = require('googleapis');
1849
+ * const securityposture = google.securityposture('v1');
1850
+ *
1851
+ * async function main() {
1852
+ * const auth = new google.auth.GoogleAuth({
1853
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1854
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1855
+ * });
1856
+ *
1857
+ * // Acquire an auth client, and bind it to all future calls
1858
+ * const authClient = await auth.getClient();
1859
+ * google.options({auth: authClient});
1860
+ *
1861
+ * // Do the magic
1862
+ * const res = await securityposture.organizations.locations.postures.extract({
1863
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
1864
+ * parent: 'organizations/my-organization/locations/my-location',
1865
+ *
1866
+ * // Request body metadata
1867
+ * requestBody: {
1868
+ * // request body parameters
1869
+ * // {
1870
+ * // "postureId": "my_postureId",
1871
+ * // "workload": "my_workload"
1872
+ * // }
1873
+ * },
1874
+ * });
1875
+ * console.log(res.data);
1876
+ *
1877
+ * // Example response
1878
+ * // {
1879
+ * // "done": false,
1880
+ * // "error": {},
1881
+ * // "metadata": {},
1882
+ * // "name": "my_name",
1883
+ * // "response": {}
1884
+ * // }
1885
+ * }
1886
+ *
1887
+ * main().catch(e => {
1888
+ * console.error(e);
1889
+ * throw e;
1890
+ * });
1891
+ *
1892
+ * ```
1196
1893
  *
1197
1894
  * @param params - Parameters for request
1198
1895
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1207,6 +1904,64 @@ export declare namespace securityposture_v1 {
1207
1904
  extract(callback: BodyResponseCallback<Schema$Operation>): void;
1208
1905
  /**
1209
1906
  * Gets a single revision of a Posture.
1907
+ * @example
1908
+ * ```js
1909
+ * // Before running the sample:
1910
+ * // - Enable the API at:
1911
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1912
+ * // - Login into gcloud by running:
1913
+ * // ```sh
1914
+ * // $ gcloud auth application-default login
1915
+ * // ```
1916
+ * // - Install the npm module by running:
1917
+ * // ```sh
1918
+ * // $ npm install googleapis
1919
+ * // ```
1920
+ *
1921
+ * const {google} = require('googleapis');
1922
+ * const securityposture = google.securityposture('v1');
1923
+ *
1924
+ * async function main() {
1925
+ * const auth = new google.auth.GoogleAuth({
1926
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1927
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1928
+ * });
1929
+ *
1930
+ * // Acquire an auth client, and bind it to all future calls
1931
+ * const authClient = await auth.getClient();
1932
+ * google.options({auth: authClient});
1933
+ *
1934
+ * // Do the magic
1935
+ * const res = await securityposture.organizations.locations.postures.get({
1936
+ * // Required. The name of the Posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
1937
+ * name: 'organizations/my-organization/locations/my-location/postures/my-posture',
1938
+ * // Optional. The posture revision to retrieve. If not specified, the most recently updated revision is retrieved.
1939
+ * revisionId: 'placeholder-value',
1940
+ * });
1941
+ * console.log(res.data);
1942
+ *
1943
+ * // Example response
1944
+ * // {
1945
+ * // "annotations": {},
1946
+ * // "categories": [],
1947
+ * // "createTime": "my_createTime",
1948
+ * // "description": "my_description",
1949
+ * // "etag": "my_etag",
1950
+ * // "name": "my_name",
1951
+ * // "policySets": [],
1952
+ * // "reconciling": false,
1953
+ * // "revisionId": "my_revisionId",
1954
+ * // "state": "my_state",
1955
+ * // "updateTime": "my_updateTime"
1956
+ * // }
1957
+ * }
1958
+ *
1959
+ * main().catch(e => {
1960
+ * console.error(e);
1961
+ * throw e;
1962
+ * });
1963
+ *
1964
+ * ```
1210
1965
  *
1211
1966
  * @param params - Parameters for request
1212
1967
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1221,6 +1976,60 @@ export declare namespace securityposture_v1 {
1221
1976
  get(callback: BodyResponseCallback<Schema$Posture>): void;
1222
1977
  /**
1223
1978
  * Lists the most recent revisions of all Posture resources in a specified organization and location.
1979
+ * @example
1980
+ * ```js
1981
+ * // Before running the sample:
1982
+ * // - Enable the API at:
1983
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
1984
+ * // - Login into gcloud by running:
1985
+ * // ```sh
1986
+ * // $ gcloud auth application-default login
1987
+ * // ```
1988
+ * // - Install the npm module by running:
1989
+ * // ```sh
1990
+ * // $ npm install googleapis
1991
+ * // ```
1992
+ *
1993
+ * const {google} = require('googleapis');
1994
+ * const securityposture = google.securityposture('v1');
1995
+ *
1996
+ * async function main() {
1997
+ * const auth = new google.auth.GoogleAuth({
1998
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1999
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2000
+ * });
2001
+ *
2002
+ * // Acquire an auth client, and bind it to all future calls
2003
+ * const authClient = await auth.getClient();
2004
+ * google.options({auth: authClient});
2005
+ *
2006
+ * // Do the magic
2007
+ * const res = await securityposture.organizations.locations.postures.list({
2008
+ * // Optional. A filter to apply to the list of postures, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
2009
+ * filter: 'placeholder-value',
2010
+ * // The maximum number of postures to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2011
+ * pageSize: 'placeholder-value',
2012
+ * // A pagination token returned from a previous request to list postures. Provide this token to retrieve the next page of results.
2013
+ * pageToken: 'placeholder-value',
2014
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2015
+ * parent: 'organizations/my-organization/locations/my-location',
2016
+ * });
2017
+ * console.log(res.data);
2018
+ *
2019
+ * // Example response
2020
+ * // {
2021
+ * // "nextPageToken": "my_nextPageToken",
2022
+ * // "postures": [],
2023
+ * // "unreachable": []
2024
+ * // }
2025
+ * }
2026
+ *
2027
+ * main().catch(e => {
2028
+ * console.error(e);
2029
+ * throw e;
2030
+ * });
2031
+ *
2032
+ * ```
1224
2033
  *
1225
2034
  * @param params - Parameters for request
1226
2035
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1235,6 +2044,58 @@ export declare namespace securityposture_v1 {
1235
2044
  list(callback: BodyResponseCallback<Schema$ListPosturesResponse>): void;
1236
2045
  /**
1237
2046
  * Lists all revisions of a single Posture.
2047
+ * @example
2048
+ * ```js
2049
+ * // Before running the sample:
2050
+ * // - Enable the API at:
2051
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2052
+ * // - Login into gcloud by running:
2053
+ * // ```sh
2054
+ * // $ gcloud auth application-default login
2055
+ * // ```
2056
+ * // - Install the npm module by running:
2057
+ * // ```sh
2058
+ * // $ npm install googleapis
2059
+ * // ```
2060
+ *
2061
+ * const {google} = require('googleapis');
2062
+ * const securityposture = google.securityposture('v1');
2063
+ *
2064
+ * async function main() {
2065
+ * const auth = new google.auth.GoogleAuth({
2066
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2067
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2068
+ * });
2069
+ *
2070
+ * // Acquire an auth client, and bind it to all future calls
2071
+ * const authClient = await auth.getClient();
2072
+ * google.options({auth: authClient});
2073
+ *
2074
+ * // Do the magic
2075
+ * const res =
2076
+ * await securityposture.organizations.locations.postures.listRevisions({
2077
+ * // Required. The name of the Posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
2078
+ * name: 'organizations/my-organization/locations/my-location/postures/my-posture',
2079
+ * // Optional. The maximum number of posture revisions to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2080
+ * pageSize: 'placeholder-value',
2081
+ * // Optional. A pagination token from a previous request to list posture revisions. Provide this token to retrieve the next page of results.
2082
+ * pageToken: 'placeholder-value',
2083
+ * });
2084
+ * console.log(res.data);
2085
+ *
2086
+ * // Example response
2087
+ * // {
2088
+ * // "nextPageToken": "my_nextPageToken",
2089
+ * // "revisions": []
2090
+ * // }
2091
+ * }
2092
+ *
2093
+ * main().catch(e => {
2094
+ * console.error(e);
2095
+ * throw e;
2096
+ * });
2097
+ *
2098
+ * ```
1238
2099
  *
1239
2100
  * @param params - Parameters for request
1240
2101
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1249,6 +2110,78 @@ export declare namespace securityposture_v1 {
1249
2110
  listRevisions(callback: BodyResponseCallback<Schema$ListPostureRevisionsResponse>): void;
1250
2111
  /**
1251
2112
  * Updates a revision of an existing Posture. If the posture revision that you update is currently deployed, then a new revision of the posture is created. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture: 1. Call GetPosture to get the current version of the posture. 2. Update the fields in the posture as needed. 3. Call UpdatePosture to update the posture. Ensure that your request includes the `etag` value from the GetPosture response. **Important:** If you omit the `etag` when you call UpdatePosture, then the updated posture unconditionally overwrites the existing posture.
2113
+ * @example
2114
+ * ```js
2115
+ * // Before running the sample:
2116
+ * // - Enable the API at:
2117
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2118
+ * // - Login into gcloud by running:
2119
+ * // ```sh
2120
+ * // $ gcloud auth application-default login
2121
+ * // ```
2122
+ * // - Install the npm module by running:
2123
+ * // ```sh
2124
+ * // $ npm install googleapis
2125
+ * // ```
2126
+ *
2127
+ * const {google} = require('googleapis');
2128
+ * const securityposture = google.securityposture('v1');
2129
+ *
2130
+ * async function main() {
2131
+ * const auth = new google.auth.GoogleAuth({
2132
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2133
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2134
+ * });
2135
+ *
2136
+ * // Acquire an auth client, and bind it to all future calls
2137
+ * const authClient = await auth.getClient();
2138
+ * google.options({auth: authClient});
2139
+ *
2140
+ * // Do the magic
2141
+ * const res = await securityposture.organizations.locations.postures.patch({
2142
+ * // Required. Identifier. The name of the posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
2143
+ * name: 'organizations/my-organization/locations/my-location/postures/my-posture',
2144
+ * // Required. The revision ID of the posture to update. If the posture revision that you update is currently deployed, then a new revision of the posture is created.
2145
+ * revisionId: 'placeholder-value',
2146
+ * // Required. The fields in the Posture to update. You can update only the following fields: * Posture.description * Posture.policy_sets * Posture.state
2147
+ * updateMask: 'placeholder-value',
2148
+ *
2149
+ * // Request body metadata
2150
+ * requestBody: {
2151
+ * // request body parameters
2152
+ * // {
2153
+ * // "annotations": {},
2154
+ * // "categories": [],
2155
+ * // "createTime": "my_createTime",
2156
+ * // "description": "my_description",
2157
+ * // "etag": "my_etag",
2158
+ * // "name": "my_name",
2159
+ * // "policySets": [],
2160
+ * // "reconciling": false,
2161
+ * // "revisionId": "my_revisionId",
2162
+ * // "state": "my_state",
2163
+ * // "updateTime": "my_updateTime"
2164
+ * // }
2165
+ * },
2166
+ * });
2167
+ * console.log(res.data);
2168
+ *
2169
+ * // Example response
2170
+ * // {
2171
+ * // "done": false,
2172
+ * // "error": {},
2173
+ * // "metadata": {},
2174
+ * // "name": "my_name",
2175
+ * // "response": {}
2176
+ * // }
2177
+ * }
2178
+ *
2179
+ * main().catch(e => {
2180
+ * console.error(e);
2181
+ * throw e;
2182
+ * });
2183
+ *
2184
+ * ```
1252
2185
  *
1253
2186
  * @param params - Parameters for request
1254
2187
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1361,6 +2294,60 @@ export declare namespace securityposture_v1 {
1361
2294
  constructor(context: APIRequestContext);
1362
2295
  /**
1363
2296
  * Gets a single revision of a PostureTemplate.
2297
+ * @example
2298
+ * ```js
2299
+ * // Before running the sample:
2300
+ * // - Enable the API at:
2301
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2302
+ * // - Login into gcloud by running:
2303
+ * // ```sh
2304
+ * // $ gcloud auth application-default login
2305
+ * // ```
2306
+ * // - Install the npm module by running:
2307
+ * // ```sh
2308
+ * // $ npm install googleapis
2309
+ * // ```
2310
+ *
2311
+ * const {google} = require('googleapis');
2312
+ * const securityposture = google.securityposture('v1');
2313
+ *
2314
+ * async function main() {
2315
+ * const auth = new google.auth.GoogleAuth({
2316
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2317
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2318
+ * });
2319
+ *
2320
+ * // Acquire an auth client, and bind it to all future calls
2321
+ * const authClient = await auth.getClient();
2322
+ * google.options({auth: authClient});
2323
+ *
2324
+ * // Do the magic
2325
+ * const res =
2326
+ * await securityposture.organizations.locations.postureTemplates.get({
2327
+ * // Required. The name of the PostureTemplate, in the format `organizations/{organization\}/locations/global/postureTemplates/{posture_template\}`.
2328
+ * name: 'organizations/my-organization/locations/my-location/postureTemplates/my-postureTemplate',
2329
+ * // Optional. The posture template revision to retrieve. If not specified, the most recently updated revision is retrieved.
2330
+ * revisionId: 'placeholder-value',
2331
+ * });
2332
+ * console.log(res.data);
2333
+ *
2334
+ * // Example response
2335
+ * // {
2336
+ * // "categories": [],
2337
+ * // "description": "my_description",
2338
+ * // "name": "my_name",
2339
+ * // "policySets": [],
2340
+ * // "revisionId": "my_revisionId",
2341
+ * // "state": "my_state"
2342
+ * // }
2343
+ * }
2344
+ *
2345
+ * main().catch(e => {
2346
+ * console.error(e);
2347
+ * throw e;
2348
+ * });
2349
+ *
2350
+ * ```
1364
2351
  *
1365
2352
  * @param params - Parameters for request
1366
2353
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1375,6 +2362,60 @@ export declare namespace securityposture_v1 {
1375
2362
  get(callback: BodyResponseCallback<Schema$PostureTemplate>): void;
1376
2363
  /**
1377
2364
  * Lists every PostureTemplate in a given organization and location.
2365
+ * @example
2366
+ * ```js
2367
+ * // Before running the sample:
2368
+ * // - Enable the API at:
2369
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2370
+ * // - Login into gcloud by running:
2371
+ * // ```sh
2372
+ * // $ gcloud auth application-default login
2373
+ * // ```
2374
+ * // - Install the npm module by running:
2375
+ * // ```sh
2376
+ * // $ npm install googleapis
2377
+ * // ```
2378
+ *
2379
+ * const {google} = require('googleapis');
2380
+ * const securityposture = google.securityposture('v1');
2381
+ *
2382
+ * async function main() {
2383
+ * const auth = new google.auth.GoogleAuth({
2384
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2385
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2386
+ * });
2387
+ *
2388
+ * // Acquire an auth client, and bind it to all future calls
2389
+ * const authClient = await auth.getClient();
2390
+ * google.options({auth: authClient});
2391
+ *
2392
+ * // Do the magic
2393
+ * const res =
2394
+ * await securityposture.organizations.locations.postureTemplates.list({
2395
+ * // Optional. A filter to apply to the list of postures, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
2396
+ * filter: 'placeholder-value',
2397
+ * // Optional. The maximum number of posture templates to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2398
+ * pageSize: 'placeholder-value',
2399
+ * // Optional. A pagination token returned from a previous request to list posture templates. Provide this token to retrieve the next page of results.
2400
+ * pageToken: 'placeholder-value',
2401
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2402
+ * parent: 'organizations/my-organization/locations/my-location',
2403
+ * });
2404
+ * console.log(res.data);
2405
+ *
2406
+ * // Example response
2407
+ * // {
2408
+ * // "nextPageToken": "my_nextPageToken",
2409
+ * // "postureTemplates": []
2410
+ * // }
2411
+ * }
2412
+ *
2413
+ * main().catch(e => {
2414
+ * console.error(e);
2415
+ * throw e;
2416
+ * });
2417
+ *
2418
+ * ```
1378
2419
  *
1379
2420
  * @param params - Parameters for request
1380
2421
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1421,6 +2462,67 @@ export declare namespace securityposture_v1 {
1421
2462
  constructor(context: APIRequestContext);
1422
2463
  /**
1423
2464
  * Validates a specified infrastructure-as-code (IaC) configuration, and creates a Report with the validation results. Only Terraform configurations are supported. Only modified assets are validated.
2465
+ * @example
2466
+ * ```js
2467
+ * // Before running the sample:
2468
+ * // - Enable the API at:
2469
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2470
+ * // - Login into gcloud by running:
2471
+ * // ```sh
2472
+ * // $ gcloud auth application-default login
2473
+ * // ```
2474
+ * // - Install the npm module by running:
2475
+ * // ```sh
2476
+ * // $ npm install googleapis
2477
+ * // ```
2478
+ *
2479
+ * const {google} = require('googleapis');
2480
+ * const securityposture = google.securityposture('v1');
2481
+ *
2482
+ * async function main() {
2483
+ * const auth = new google.auth.GoogleAuth({
2484
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2485
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2486
+ * });
2487
+ *
2488
+ * // Acquire an auth client, and bind it to all future calls
2489
+ * const authClient = await auth.getClient();
2490
+ * google.options({auth: authClient});
2491
+ *
2492
+ * // Do the magic
2493
+ * const res =
2494
+ * await securityposture.organizations.locations.reports.createIaCValidationReport(
2495
+ * {
2496
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2497
+ * parent: 'organizations/my-organization/locations/my-location',
2498
+ *
2499
+ * // Request body metadata
2500
+ * requestBody: {
2501
+ * // request body parameters
2502
+ * // {
2503
+ * // "iac": {}
2504
+ * // }
2505
+ * },
2506
+ * },
2507
+ * );
2508
+ * console.log(res.data);
2509
+ *
2510
+ * // Example response
2511
+ * // {
2512
+ * // "done": false,
2513
+ * // "error": {},
2514
+ * // "metadata": {},
2515
+ * // "name": "my_name",
2516
+ * // "response": {}
2517
+ * // }
2518
+ * }
2519
+ *
2520
+ * main().catch(e => {
2521
+ * console.error(e);
2522
+ * throw e;
2523
+ * });
2524
+ *
2525
+ * ```
1424
2526
  *
1425
2527
  * @param params - Parameters for request
1426
2528
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1435,6 +2537,55 @@ export declare namespace securityposture_v1 {
1435
2537
  createIaCValidationReport(callback: BodyResponseCallback<Schema$Operation>): void;
1436
2538
  /**
1437
2539
  * Gets details for a Report.
2540
+ * @example
2541
+ * ```js
2542
+ * // Before running the sample:
2543
+ * // - Enable the API at:
2544
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2545
+ * // - Login into gcloud by running:
2546
+ * // ```sh
2547
+ * // $ gcloud auth application-default login
2548
+ * // ```
2549
+ * // - Install the npm module by running:
2550
+ * // ```sh
2551
+ * // $ npm install googleapis
2552
+ * // ```
2553
+ *
2554
+ * const {google} = require('googleapis');
2555
+ * const securityposture = google.securityposture('v1');
2556
+ *
2557
+ * async function main() {
2558
+ * const auth = new google.auth.GoogleAuth({
2559
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2560
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2561
+ * });
2562
+ *
2563
+ * // Acquire an auth client, and bind it to all future calls
2564
+ * const authClient = await auth.getClient();
2565
+ * google.options({auth: authClient});
2566
+ *
2567
+ * // Do the magic
2568
+ * const res = await securityposture.organizations.locations.reports.get({
2569
+ * // Required. The name of the report, in the format `organizations/{organization\}/locations/global/reports/{report_id\}`.
2570
+ * name: 'organizations/my-organization/locations/my-location/reports/my-report',
2571
+ * });
2572
+ * console.log(res.data);
2573
+ *
2574
+ * // Example response
2575
+ * // {
2576
+ * // "createTime": "my_createTime",
2577
+ * // "iacValidationReport": {},
2578
+ * // "name": "my_name",
2579
+ * // "updateTime": "my_updateTime"
2580
+ * // }
2581
+ * }
2582
+ *
2583
+ * main().catch(e => {
2584
+ * console.error(e);
2585
+ * throw e;
2586
+ * });
2587
+ *
2588
+ * ```
1438
2589
  *
1439
2590
  * @param params - Parameters for request
1440
2591
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1449,6 +2600,60 @@ export declare namespace securityposture_v1 {
1449
2600
  get(callback: BodyResponseCallback<Schema$Report>): void;
1450
2601
  /**
1451
2602
  * Lists every Report in a given organization and location.
2603
+ * @example
2604
+ * ```js
2605
+ * // Before running the sample:
2606
+ * // - Enable the API at:
2607
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2608
+ * // - Login into gcloud by running:
2609
+ * // ```sh
2610
+ * // $ gcloud auth application-default login
2611
+ * // ```
2612
+ * // - Install the npm module by running:
2613
+ * // ```sh
2614
+ * // $ npm install googleapis
2615
+ * // ```
2616
+ *
2617
+ * const {google} = require('googleapis');
2618
+ * const securityposture = google.securityposture('v1');
2619
+ *
2620
+ * async function main() {
2621
+ * const auth = new google.auth.GoogleAuth({
2622
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2623
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2624
+ * });
2625
+ *
2626
+ * // Acquire an auth client, and bind it to all future calls
2627
+ * const authClient = await auth.getClient();
2628
+ * google.options({auth: authClient});
2629
+ *
2630
+ * // Do the magic
2631
+ * const res = await securityposture.organizations.locations.reports.list({
2632
+ * // Optional. A filter to apply to the list of reports, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
2633
+ * filter: 'placeholder-value',
2634
+ * // Optional. The maximum number of reports to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2635
+ * pageSize: 'placeholder-value',
2636
+ * // Optional. A pagination token returned from a previous request to list reports. Provide this token to retrieve the next page of results.
2637
+ * pageToken: 'placeholder-value',
2638
+ * // Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2639
+ * parent: 'organizations/my-organization/locations/my-location',
2640
+ * });
2641
+ * console.log(res.data);
2642
+ *
2643
+ * // Example response
2644
+ * // {
2645
+ * // "nextPageToken": "my_nextPageToken",
2646
+ * // "reports": [],
2647
+ * // "unreachable": []
2648
+ * // }
2649
+ * }
2650
+ *
2651
+ * main().catch(e => {
2652
+ * console.error(e);
2653
+ * throw e;
2654
+ * });
2655
+ *
2656
+ * ```
1452
2657
  *
1453
2658
  * @param params - Parameters for request
1454
2659
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1506,6 +2711,56 @@ export declare namespace securityposture_v1 {
1506
2711
  constructor(context: APIRequestContext);
1507
2712
  /**
1508
2713
  * Gets information about a location.
2714
+ * @example
2715
+ * ```js
2716
+ * // Before running the sample:
2717
+ * // - Enable the API at:
2718
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2719
+ * // - Login into gcloud by running:
2720
+ * // ```sh
2721
+ * // $ gcloud auth application-default login
2722
+ * // ```
2723
+ * // - Install the npm module by running:
2724
+ * // ```sh
2725
+ * // $ npm install googleapis
2726
+ * // ```
2727
+ *
2728
+ * const {google} = require('googleapis');
2729
+ * const securityposture = google.securityposture('v1');
2730
+ *
2731
+ * async function main() {
2732
+ * const auth = new google.auth.GoogleAuth({
2733
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2734
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2735
+ * });
2736
+ *
2737
+ * // Acquire an auth client, and bind it to all future calls
2738
+ * const authClient = await auth.getClient();
2739
+ * google.options({auth: authClient});
2740
+ *
2741
+ * // Do the magic
2742
+ * const res = await securityposture.projects.locations.get({
2743
+ * // Resource name for the location.
2744
+ * name: 'projects/my-project/locations/my-location',
2745
+ * });
2746
+ * console.log(res.data);
2747
+ *
2748
+ * // Example response
2749
+ * // {
2750
+ * // "displayName": "my_displayName",
2751
+ * // "labels": {},
2752
+ * // "locationId": "my_locationId",
2753
+ * // "metadata": {},
2754
+ * // "name": "my_name"
2755
+ * // }
2756
+ * }
2757
+ *
2758
+ * main().catch(e => {
2759
+ * console.error(e);
2760
+ * throw e;
2761
+ * });
2762
+ *
2763
+ * ```
1509
2764
  *
1510
2765
  * @param params - Parameters for request
1511
2766
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1520,6 +2775,61 @@ export declare namespace securityposture_v1 {
1520
2775
  get(callback: BodyResponseCallback<Schema$Location>): void;
1521
2776
  /**
1522
2777
  * Lists information about the supported locations for this service.
2778
+ * @example
2779
+ * ```js
2780
+ * // Before running the sample:
2781
+ * // - Enable the API at:
2782
+ * // https://console.developers.google.com/apis/api/securityposture.googleapis.com
2783
+ * // - Login into gcloud by running:
2784
+ * // ```sh
2785
+ * // $ gcloud auth application-default login
2786
+ * // ```
2787
+ * // - Install the npm module by running:
2788
+ * // ```sh
2789
+ * // $ npm install googleapis
2790
+ * // ```
2791
+ *
2792
+ * const {google} = require('googleapis');
2793
+ * const securityposture = google.securityposture('v1');
2794
+ *
2795
+ * async function main() {
2796
+ * const auth = new google.auth.GoogleAuth({
2797
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2798
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2799
+ * });
2800
+ *
2801
+ * // Acquire an auth client, and bind it to all future calls
2802
+ * const authClient = await auth.getClient();
2803
+ * google.options({auth: authClient});
2804
+ *
2805
+ * // Do the magic
2806
+ * const res = await securityposture.projects.locations.list({
2807
+ * // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
2808
+ * extraLocationTypes: 'placeholder-value',
2809
+ * // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
2810
+ * filter: 'placeholder-value',
2811
+ * // The resource that owns the locations collection, if applicable.
2812
+ * name: 'projects/my-project',
2813
+ * // The maximum number of results to return. If not set, the service selects a default.
2814
+ * pageSize: 'placeholder-value',
2815
+ * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
2816
+ * pageToken: 'placeholder-value',
2817
+ * });
2818
+ * console.log(res.data);
2819
+ *
2820
+ * // Example response
2821
+ * // {
2822
+ * // "locations": [],
2823
+ * // "nextPageToken": "my_nextPageToken"
2824
+ * // }
2825
+ * }
2826
+ *
2827
+ * main().catch(e => {
2828
+ * console.error(e);
2829
+ * throw e;
2830
+ * });
2831
+ *
2832
+ * ```
1523
2833
  *
1524
2834
  * @param params - Parameters for request
1525
2835
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1540,6 +2850,10 @@ export declare namespace securityposture_v1 {
1540
2850
  name?: string;
1541
2851
  }
1542
2852
  export interface Params$Resource$Projects$Locations$List extends StandardParameters {
2853
+ /**
2854
+ * Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
2855
+ */
2856
+ extraLocationTypes?: string[];
1543
2857
  /**
1544
2858
  * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
1545
2859
  */