@googleapis/storage 5.1.0 → 5.1.2
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 +14 -0
- package/build/v1.d.ts +0 -3907
- package/build/v1.js.map +1 -1
- package/package.json +3 -3
- package/v1.ts +0 -3907
package/v1.ts
CHANGED
|
@@ -942,50 +942,6 @@ export namespace storage_v1 {
|
|
|
942
942
|
|
|
943
943
|
/**
|
|
944
944
|
* Permanently deletes the ACL entry for the specified entity on the specified bucket.
|
|
945
|
-
* @example
|
|
946
|
-
* ```js
|
|
947
|
-
* // Before running the sample:
|
|
948
|
-
* // - Enable the API at:
|
|
949
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
950
|
-
* // - Login into gcloud by running:
|
|
951
|
-
* // `$ gcloud auth application-default login`
|
|
952
|
-
* // - Install the npm module by running:
|
|
953
|
-
* // `$ npm install googleapis`
|
|
954
|
-
*
|
|
955
|
-
* const {google} = require('googleapis');
|
|
956
|
-
* const storage = google.storage('v1');
|
|
957
|
-
*
|
|
958
|
-
* async function main() {
|
|
959
|
-
* const auth = new google.auth.GoogleAuth({
|
|
960
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
961
|
-
* scopes: [
|
|
962
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
963
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
964
|
-
* ],
|
|
965
|
-
* });
|
|
966
|
-
*
|
|
967
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
968
|
-
* const authClient = await auth.getClient();
|
|
969
|
-
* google.options({auth: authClient});
|
|
970
|
-
*
|
|
971
|
-
* // Do the magic
|
|
972
|
-
* const res = await storage.bucketAccessControls.delete({
|
|
973
|
-
* // Name of a bucket.
|
|
974
|
-
* bucket: 'placeholder-value',
|
|
975
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
976
|
-
* entity: 'placeholder-value',
|
|
977
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
978
|
-
* userProject: 'placeholder-value',
|
|
979
|
-
* });
|
|
980
|
-
* console.log(res.data);
|
|
981
|
-
* }
|
|
982
|
-
*
|
|
983
|
-
* main().catch(e => {
|
|
984
|
-
* console.error(e);
|
|
985
|
-
* throw e;
|
|
986
|
-
* });
|
|
987
|
-
*
|
|
988
|
-
* ```
|
|
989
945
|
*
|
|
990
946
|
* @param params - Parameters for request
|
|
991
947
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1071,65 +1027,6 @@ export namespace storage_v1 {
|
|
|
1071
1027
|
|
|
1072
1028
|
/**
|
|
1073
1029
|
* Returns the ACL entry for the specified entity on the specified bucket.
|
|
1074
|
-
* @example
|
|
1075
|
-
* ```js
|
|
1076
|
-
* // Before running the sample:
|
|
1077
|
-
* // - Enable the API at:
|
|
1078
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
1079
|
-
* // - Login into gcloud by running:
|
|
1080
|
-
* // `$ gcloud auth application-default login`
|
|
1081
|
-
* // - Install the npm module by running:
|
|
1082
|
-
* // `$ npm install googleapis`
|
|
1083
|
-
*
|
|
1084
|
-
* const {google} = require('googleapis');
|
|
1085
|
-
* const storage = google.storage('v1');
|
|
1086
|
-
*
|
|
1087
|
-
* async function main() {
|
|
1088
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1089
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1090
|
-
* scopes: [
|
|
1091
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1092
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
1093
|
-
* ],
|
|
1094
|
-
* });
|
|
1095
|
-
*
|
|
1096
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1097
|
-
* const authClient = await auth.getClient();
|
|
1098
|
-
* google.options({auth: authClient});
|
|
1099
|
-
*
|
|
1100
|
-
* // Do the magic
|
|
1101
|
-
* const res = await storage.bucketAccessControls.get({
|
|
1102
|
-
* // Name of a bucket.
|
|
1103
|
-
* bucket: 'placeholder-value',
|
|
1104
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
1105
|
-
* entity: 'placeholder-value',
|
|
1106
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
1107
|
-
* userProject: 'placeholder-value',
|
|
1108
|
-
* });
|
|
1109
|
-
* console.log(res.data);
|
|
1110
|
-
*
|
|
1111
|
-
* // Example response
|
|
1112
|
-
* // {
|
|
1113
|
-
* // "bucket": "my_bucket",
|
|
1114
|
-
* // "domain": "my_domain",
|
|
1115
|
-
* // "email": "my_email",
|
|
1116
|
-
* // "entity": "my_entity",
|
|
1117
|
-
* // "entityId": "my_entityId",
|
|
1118
|
-
* // "etag": "my_etag",
|
|
1119
|
-
* // "id": "my_id",
|
|
1120
|
-
* // "kind": "my_kind",
|
|
1121
|
-
* // "projectTeam": {},
|
|
1122
|
-
* // "role": "my_role",
|
|
1123
|
-
* // "selfLink": "my_selfLink"
|
|
1124
|
-
* // }
|
|
1125
|
-
* }
|
|
1126
|
-
*
|
|
1127
|
-
* main().catch(e => {
|
|
1128
|
-
* console.error(e);
|
|
1129
|
-
* throw e;
|
|
1130
|
-
* });
|
|
1131
|
-
*
|
|
1132
|
-
* ```
|
|
1133
1030
|
*
|
|
1134
1031
|
* @param params - Parameters for request
|
|
1135
1032
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1220,81 +1117,6 @@ export namespace storage_v1 {
|
|
|
1220
1117
|
|
|
1221
1118
|
/**
|
|
1222
1119
|
* Creates a new ACL entry on the specified bucket.
|
|
1223
|
-
* @example
|
|
1224
|
-
* ```js
|
|
1225
|
-
* // Before running the sample:
|
|
1226
|
-
* // - Enable the API at:
|
|
1227
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
1228
|
-
* // - Login into gcloud by running:
|
|
1229
|
-
* // `$ gcloud auth application-default login`
|
|
1230
|
-
* // - Install the npm module by running:
|
|
1231
|
-
* // `$ npm install googleapis`
|
|
1232
|
-
*
|
|
1233
|
-
* const {google} = require('googleapis');
|
|
1234
|
-
* const storage = google.storage('v1');
|
|
1235
|
-
*
|
|
1236
|
-
* async function main() {
|
|
1237
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1238
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1239
|
-
* scopes: [
|
|
1240
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1241
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
1242
|
-
* ],
|
|
1243
|
-
* });
|
|
1244
|
-
*
|
|
1245
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1246
|
-
* const authClient = await auth.getClient();
|
|
1247
|
-
* google.options({auth: authClient});
|
|
1248
|
-
*
|
|
1249
|
-
* // Do the magic
|
|
1250
|
-
* const res = await storage.bucketAccessControls.insert({
|
|
1251
|
-
* // Name of a bucket.
|
|
1252
|
-
* bucket: 'placeholder-value',
|
|
1253
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
1254
|
-
* userProject: 'placeholder-value',
|
|
1255
|
-
*
|
|
1256
|
-
* // Request body metadata
|
|
1257
|
-
* requestBody: {
|
|
1258
|
-
* // request body parameters
|
|
1259
|
-
* // {
|
|
1260
|
-
* // "bucket": "my_bucket",
|
|
1261
|
-
* // "domain": "my_domain",
|
|
1262
|
-
* // "email": "my_email",
|
|
1263
|
-
* // "entity": "my_entity",
|
|
1264
|
-
* // "entityId": "my_entityId",
|
|
1265
|
-
* // "etag": "my_etag",
|
|
1266
|
-
* // "id": "my_id",
|
|
1267
|
-
* // "kind": "my_kind",
|
|
1268
|
-
* // "projectTeam": {},
|
|
1269
|
-
* // "role": "my_role",
|
|
1270
|
-
* // "selfLink": "my_selfLink"
|
|
1271
|
-
* // }
|
|
1272
|
-
* },
|
|
1273
|
-
* });
|
|
1274
|
-
* console.log(res.data);
|
|
1275
|
-
*
|
|
1276
|
-
* // Example response
|
|
1277
|
-
* // {
|
|
1278
|
-
* // "bucket": "my_bucket",
|
|
1279
|
-
* // "domain": "my_domain",
|
|
1280
|
-
* // "email": "my_email",
|
|
1281
|
-
* // "entity": "my_entity",
|
|
1282
|
-
* // "entityId": "my_entityId",
|
|
1283
|
-
* // "etag": "my_etag",
|
|
1284
|
-
* // "id": "my_id",
|
|
1285
|
-
* // "kind": "my_kind",
|
|
1286
|
-
* // "projectTeam": {},
|
|
1287
|
-
* // "role": "my_role",
|
|
1288
|
-
* // "selfLink": "my_selfLink"
|
|
1289
|
-
* // }
|
|
1290
|
-
* }
|
|
1291
|
-
*
|
|
1292
|
-
* main().catch(e => {
|
|
1293
|
-
* console.error(e);
|
|
1294
|
-
* throw e;
|
|
1295
|
-
* });
|
|
1296
|
-
*
|
|
1297
|
-
* ```
|
|
1298
1120
|
*
|
|
1299
1121
|
* @param params - Parameters for request
|
|
1300
1122
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1385,54 +1207,6 @@ export namespace storage_v1 {
|
|
|
1385
1207
|
|
|
1386
1208
|
/**
|
|
1387
1209
|
* Retrieves ACL entries on the specified bucket.
|
|
1388
|
-
* @example
|
|
1389
|
-
* ```js
|
|
1390
|
-
* // Before running the sample:
|
|
1391
|
-
* // - Enable the API at:
|
|
1392
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
1393
|
-
* // - Login into gcloud by running:
|
|
1394
|
-
* // `$ gcloud auth application-default login`
|
|
1395
|
-
* // - Install the npm module by running:
|
|
1396
|
-
* // `$ npm install googleapis`
|
|
1397
|
-
*
|
|
1398
|
-
* const {google} = require('googleapis');
|
|
1399
|
-
* const storage = google.storage('v1');
|
|
1400
|
-
*
|
|
1401
|
-
* async function main() {
|
|
1402
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1403
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1404
|
-
* scopes: [
|
|
1405
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1406
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
1407
|
-
* ],
|
|
1408
|
-
* });
|
|
1409
|
-
*
|
|
1410
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1411
|
-
* const authClient = await auth.getClient();
|
|
1412
|
-
* google.options({auth: authClient});
|
|
1413
|
-
*
|
|
1414
|
-
* // Do the magic
|
|
1415
|
-
* const res = await storage.bucketAccessControls.list({
|
|
1416
|
-
* // Name of a bucket.
|
|
1417
|
-
* bucket: 'placeholder-value',
|
|
1418
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
1419
|
-
* userProject: 'placeholder-value',
|
|
1420
|
-
* });
|
|
1421
|
-
* console.log(res.data);
|
|
1422
|
-
*
|
|
1423
|
-
* // Example response
|
|
1424
|
-
* // {
|
|
1425
|
-
* // "items": [],
|
|
1426
|
-
* // "kind": "my_kind"
|
|
1427
|
-
* // }
|
|
1428
|
-
* }
|
|
1429
|
-
*
|
|
1430
|
-
* main().catch(e => {
|
|
1431
|
-
* console.error(e);
|
|
1432
|
-
* throw e;
|
|
1433
|
-
* });
|
|
1434
|
-
*
|
|
1435
|
-
* ```
|
|
1436
1210
|
*
|
|
1437
1211
|
* @param params - Parameters for request
|
|
1438
1212
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1525,83 +1299,6 @@ export namespace storage_v1 {
|
|
|
1525
1299
|
|
|
1526
1300
|
/**
|
|
1527
1301
|
* Patches an ACL entry on the specified bucket.
|
|
1528
|
-
* @example
|
|
1529
|
-
* ```js
|
|
1530
|
-
* // Before running the sample:
|
|
1531
|
-
* // - Enable the API at:
|
|
1532
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
1533
|
-
* // - Login into gcloud by running:
|
|
1534
|
-
* // `$ gcloud auth application-default login`
|
|
1535
|
-
* // - Install the npm module by running:
|
|
1536
|
-
* // `$ npm install googleapis`
|
|
1537
|
-
*
|
|
1538
|
-
* const {google} = require('googleapis');
|
|
1539
|
-
* const storage = google.storage('v1');
|
|
1540
|
-
*
|
|
1541
|
-
* async function main() {
|
|
1542
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1543
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1544
|
-
* scopes: [
|
|
1545
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1546
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
1547
|
-
* ],
|
|
1548
|
-
* });
|
|
1549
|
-
*
|
|
1550
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1551
|
-
* const authClient = await auth.getClient();
|
|
1552
|
-
* google.options({auth: authClient});
|
|
1553
|
-
*
|
|
1554
|
-
* // Do the magic
|
|
1555
|
-
* const res = await storage.bucketAccessControls.patch({
|
|
1556
|
-
* // Name of a bucket.
|
|
1557
|
-
* bucket: 'placeholder-value',
|
|
1558
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
1559
|
-
* entity: 'placeholder-value',
|
|
1560
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
1561
|
-
* userProject: 'placeholder-value',
|
|
1562
|
-
*
|
|
1563
|
-
* // Request body metadata
|
|
1564
|
-
* requestBody: {
|
|
1565
|
-
* // request body parameters
|
|
1566
|
-
* // {
|
|
1567
|
-
* // "bucket": "my_bucket",
|
|
1568
|
-
* // "domain": "my_domain",
|
|
1569
|
-
* // "email": "my_email",
|
|
1570
|
-
* // "entity": "my_entity",
|
|
1571
|
-
* // "entityId": "my_entityId",
|
|
1572
|
-
* // "etag": "my_etag",
|
|
1573
|
-
* // "id": "my_id",
|
|
1574
|
-
* // "kind": "my_kind",
|
|
1575
|
-
* // "projectTeam": {},
|
|
1576
|
-
* // "role": "my_role",
|
|
1577
|
-
* // "selfLink": "my_selfLink"
|
|
1578
|
-
* // }
|
|
1579
|
-
* },
|
|
1580
|
-
* });
|
|
1581
|
-
* console.log(res.data);
|
|
1582
|
-
*
|
|
1583
|
-
* // Example response
|
|
1584
|
-
* // {
|
|
1585
|
-
* // "bucket": "my_bucket",
|
|
1586
|
-
* // "domain": "my_domain",
|
|
1587
|
-
* // "email": "my_email",
|
|
1588
|
-
* // "entity": "my_entity",
|
|
1589
|
-
* // "entityId": "my_entityId",
|
|
1590
|
-
* // "etag": "my_etag",
|
|
1591
|
-
* // "id": "my_id",
|
|
1592
|
-
* // "kind": "my_kind",
|
|
1593
|
-
* // "projectTeam": {},
|
|
1594
|
-
* // "role": "my_role",
|
|
1595
|
-
* // "selfLink": "my_selfLink"
|
|
1596
|
-
* // }
|
|
1597
|
-
* }
|
|
1598
|
-
*
|
|
1599
|
-
* main().catch(e => {
|
|
1600
|
-
* console.error(e);
|
|
1601
|
-
* throw e;
|
|
1602
|
-
* });
|
|
1603
|
-
*
|
|
1604
|
-
* ```
|
|
1605
1302
|
*
|
|
1606
1303
|
* @param params - Parameters for request
|
|
1607
1304
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1692,83 +1389,6 @@ export namespace storage_v1 {
|
|
|
1692
1389
|
|
|
1693
1390
|
/**
|
|
1694
1391
|
* Updates an ACL entry on the specified bucket.
|
|
1695
|
-
* @example
|
|
1696
|
-
* ```js
|
|
1697
|
-
* // Before running the sample:
|
|
1698
|
-
* // - Enable the API at:
|
|
1699
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
1700
|
-
* // - Login into gcloud by running:
|
|
1701
|
-
* // `$ gcloud auth application-default login`
|
|
1702
|
-
* // - Install the npm module by running:
|
|
1703
|
-
* // `$ npm install googleapis`
|
|
1704
|
-
*
|
|
1705
|
-
* const {google} = require('googleapis');
|
|
1706
|
-
* const storage = google.storage('v1');
|
|
1707
|
-
*
|
|
1708
|
-
* async function main() {
|
|
1709
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1710
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1711
|
-
* scopes: [
|
|
1712
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1713
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
1714
|
-
* ],
|
|
1715
|
-
* });
|
|
1716
|
-
*
|
|
1717
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1718
|
-
* const authClient = await auth.getClient();
|
|
1719
|
-
* google.options({auth: authClient});
|
|
1720
|
-
*
|
|
1721
|
-
* // Do the magic
|
|
1722
|
-
* const res = await storage.bucketAccessControls.update({
|
|
1723
|
-
* // Name of a bucket.
|
|
1724
|
-
* bucket: 'placeholder-value',
|
|
1725
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
1726
|
-
* entity: 'placeholder-value',
|
|
1727
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
1728
|
-
* userProject: 'placeholder-value',
|
|
1729
|
-
*
|
|
1730
|
-
* // Request body metadata
|
|
1731
|
-
* requestBody: {
|
|
1732
|
-
* // request body parameters
|
|
1733
|
-
* // {
|
|
1734
|
-
* // "bucket": "my_bucket",
|
|
1735
|
-
* // "domain": "my_domain",
|
|
1736
|
-
* // "email": "my_email",
|
|
1737
|
-
* // "entity": "my_entity",
|
|
1738
|
-
* // "entityId": "my_entityId",
|
|
1739
|
-
* // "etag": "my_etag",
|
|
1740
|
-
* // "id": "my_id",
|
|
1741
|
-
* // "kind": "my_kind",
|
|
1742
|
-
* // "projectTeam": {},
|
|
1743
|
-
* // "role": "my_role",
|
|
1744
|
-
* // "selfLink": "my_selfLink"
|
|
1745
|
-
* // }
|
|
1746
|
-
* },
|
|
1747
|
-
* });
|
|
1748
|
-
* console.log(res.data);
|
|
1749
|
-
*
|
|
1750
|
-
* // Example response
|
|
1751
|
-
* // {
|
|
1752
|
-
* // "bucket": "my_bucket",
|
|
1753
|
-
* // "domain": "my_domain",
|
|
1754
|
-
* // "email": "my_email",
|
|
1755
|
-
* // "entity": "my_entity",
|
|
1756
|
-
* // "entityId": "my_entityId",
|
|
1757
|
-
* // "etag": "my_etag",
|
|
1758
|
-
* // "id": "my_id",
|
|
1759
|
-
* // "kind": "my_kind",
|
|
1760
|
-
* // "projectTeam": {},
|
|
1761
|
-
* // "role": "my_role",
|
|
1762
|
-
* // "selfLink": "my_selfLink"
|
|
1763
|
-
* // }
|
|
1764
|
-
* }
|
|
1765
|
-
*
|
|
1766
|
-
* main().catch(e => {
|
|
1767
|
-
* console.error(e);
|
|
1768
|
-
* throw e;
|
|
1769
|
-
* });
|
|
1770
|
-
*
|
|
1771
|
-
* ```
|
|
1772
1392
|
*
|
|
1773
1393
|
* @param params - Parameters for request
|
|
1774
1394
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1964,53 +1584,6 @@ export namespace storage_v1 {
|
|
|
1964
1584
|
|
|
1965
1585
|
/**
|
|
1966
1586
|
* Permanently deletes an empty bucket.
|
|
1967
|
-
* @example
|
|
1968
|
-
* ```js
|
|
1969
|
-
* // Before running the sample:
|
|
1970
|
-
* // - Enable the API at:
|
|
1971
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
1972
|
-
* // - Login into gcloud by running:
|
|
1973
|
-
* // `$ gcloud auth application-default login`
|
|
1974
|
-
* // - Install the npm module by running:
|
|
1975
|
-
* // `$ npm install googleapis`
|
|
1976
|
-
*
|
|
1977
|
-
* const {google} = require('googleapis');
|
|
1978
|
-
* const storage = google.storage('v1');
|
|
1979
|
-
*
|
|
1980
|
-
* async function main() {
|
|
1981
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1982
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1983
|
-
* scopes: [
|
|
1984
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1985
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
1986
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
1987
|
-
* ],
|
|
1988
|
-
* });
|
|
1989
|
-
*
|
|
1990
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1991
|
-
* const authClient = await auth.getClient();
|
|
1992
|
-
* google.options({auth: authClient});
|
|
1993
|
-
*
|
|
1994
|
-
* // Do the magic
|
|
1995
|
-
* const res = await storage.buckets.delete({
|
|
1996
|
-
* // Name of a bucket.
|
|
1997
|
-
* bucket: 'placeholder-value',
|
|
1998
|
-
* // If set, only deletes the bucket if its metageneration matches this value.
|
|
1999
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
2000
|
-
* // If set, only deletes the bucket if its metageneration does not match this value.
|
|
2001
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
2002
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
2003
|
-
* userProject: 'placeholder-value',
|
|
2004
|
-
* });
|
|
2005
|
-
* console.log(res.data);
|
|
2006
|
-
* }
|
|
2007
|
-
*
|
|
2008
|
-
* main().catch(e => {
|
|
2009
|
-
* console.error(e);
|
|
2010
|
-
* throw e;
|
|
2011
|
-
* });
|
|
2012
|
-
*
|
|
2013
|
-
* ```
|
|
2014
1587
|
*
|
|
2015
1588
|
* @param params - Parameters for request
|
|
2016
1589
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2095,91 +1668,6 @@ export namespace storage_v1 {
|
|
|
2095
1668
|
|
|
2096
1669
|
/**
|
|
2097
1670
|
* Returns metadata for the specified bucket.
|
|
2098
|
-
* @example
|
|
2099
|
-
* ```js
|
|
2100
|
-
* // Before running the sample:
|
|
2101
|
-
* // - Enable the API at:
|
|
2102
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
2103
|
-
* // - Login into gcloud by running:
|
|
2104
|
-
* // `$ gcloud auth application-default login`
|
|
2105
|
-
* // - Install the npm module by running:
|
|
2106
|
-
* // `$ npm install googleapis`
|
|
2107
|
-
*
|
|
2108
|
-
* const {google} = require('googleapis');
|
|
2109
|
-
* const storage = google.storage('v1');
|
|
2110
|
-
*
|
|
2111
|
-
* async function main() {
|
|
2112
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2113
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2114
|
-
* scopes: [
|
|
2115
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2116
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
2117
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
2118
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
2119
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
2120
|
-
* ],
|
|
2121
|
-
* });
|
|
2122
|
-
*
|
|
2123
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2124
|
-
* const authClient = await auth.getClient();
|
|
2125
|
-
* google.options({auth: authClient});
|
|
2126
|
-
*
|
|
2127
|
-
* // Do the magic
|
|
2128
|
-
* const res = await storage.buckets.get({
|
|
2129
|
-
* // Name of a bucket.
|
|
2130
|
-
* bucket: 'placeholder-value',
|
|
2131
|
-
* // Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
|
|
2132
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
2133
|
-
* // Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
|
|
2134
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
2135
|
-
* // Set of properties to return. Defaults to noAcl.
|
|
2136
|
-
* projection: 'placeholder-value',
|
|
2137
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
2138
|
-
* userProject: 'placeholder-value',
|
|
2139
|
-
* });
|
|
2140
|
-
* console.log(res.data);
|
|
2141
|
-
*
|
|
2142
|
-
* // Example response
|
|
2143
|
-
* // {
|
|
2144
|
-
* // "acl": [],
|
|
2145
|
-
* // "autoclass": {},
|
|
2146
|
-
* // "billing": {},
|
|
2147
|
-
* // "cors": [],
|
|
2148
|
-
* // "customPlacementConfig": {},
|
|
2149
|
-
* // "defaultEventBasedHold": false,
|
|
2150
|
-
* // "defaultObjectAcl": [],
|
|
2151
|
-
* // "encryption": {},
|
|
2152
|
-
* // "etag": "my_etag",
|
|
2153
|
-
* // "iamConfiguration": {},
|
|
2154
|
-
* // "id": "my_id",
|
|
2155
|
-
* // "kind": "my_kind",
|
|
2156
|
-
* // "labels": {},
|
|
2157
|
-
* // "lifecycle": {},
|
|
2158
|
-
* // "location": "my_location",
|
|
2159
|
-
* // "locationType": "my_locationType",
|
|
2160
|
-
* // "logging": {},
|
|
2161
|
-
* // "metageneration": "my_metageneration",
|
|
2162
|
-
* // "name": "my_name",
|
|
2163
|
-
* // "owner": {},
|
|
2164
|
-
* // "projectNumber": "my_projectNumber",
|
|
2165
|
-
* // "retentionPolicy": {},
|
|
2166
|
-
* // "rpo": "my_rpo",
|
|
2167
|
-
* // "satisfiesPZS": false,
|
|
2168
|
-
* // "selfLink": "my_selfLink",
|
|
2169
|
-
* // "storageClass": "my_storageClass",
|
|
2170
|
-
* // "timeCreated": "my_timeCreated",
|
|
2171
|
-
* // "updated": "my_updated",
|
|
2172
|
-
* // "versioning": {},
|
|
2173
|
-
* // "website": {}
|
|
2174
|
-
* // }
|
|
2175
|
-
* }
|
|
2176
|
-
*
|
|
2177
|
-
* main().catch(e => {
|
|
2178
|
-
* console.error(e);
|
|
2179
|
-
* throw e;
|
|
2180
|
-
* });
|
|
2181
|
-
*
|
|
2182
|
-
* ```
|
|
2183
1671
|
*
|
|
2184
1672
|
* @param params - Parameters for request
|
|
2185
1673
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2266,59 +1754,6 @@ export namespace storage_v1 {
|
|
|
2266
1754
|
|
|
2267
1755
|
/**
|
|
2268
1756
|
* Returns an IAM policy for the specified bucket.
|
|
2269
|
-
* @example
|
|
2270
|
-
* ```js
|
|
2271
|
-
* // Before running the sample:
|
|
2272
|
-
* // - Enable the API at:
|
|
2273
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
2274
|
-
* // - Login into gcloud by running:
|
|
2275
|
-
* // `$ gcloud auth application-default login`
|
|
2276
|
-
* // - Install the npm module by running:
|
|
2277
|
-
* // `$ npm install googleapis`
|
|
2278
|
-
*
|
|
2279
|
-
* const {google} = require('googleapis');
|
|
2280
|
-
* const storage = google.storage('v1');
|
|
2281
|
-
*
|
|
2282
|
-
* async function main() {
|
|
2283
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2284
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2285
|
-
* scopes: [
|
|
2286
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2287
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
2288
|
-
* ],
|
|
2289
|
-
* });
|
|
2290
|
-
*
|
|
2291
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2292
|
-
* const authClient = await auth.getClient();
|
|
2293
|
-
* google.options({auth: authClient});
|
|
2294
|
-
*
|
|
2295
|
-
* // Do the magic
|
|
2296
|
-
* const res = await storage.buckets.getIamPolicy({
|
|
2297
|
-
* // Name of a bucket.
|
|
2298
|
-
* bucket: 'placeholder-value',
|
|
2299
|
-
* // The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.
|
|
2300
|
-
* optionsRequestedPolicyVersion: 'placeholder-value',
|
|
2301
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
2302
|
-
* userProject: 'placeholder-value',
|
|
2303
|
-
* });
|
|
2304
|
-
* console.log(res.data);
|
|
2305
|
-
*
|
|
2306
|
-
* // Example response
|
|
2307
|
-
* // {
|
|
2308
|
-
* // "bindings": [],
|
|
2309
|
-
* // "etag": "my_etag",
|
|
2310
|
-
* // "kind": "my_kind",
|
|
2311
|
-
* // "resourceId": "my_resourceId",
|
|
2312
|
-
* // "version": 0
|
|
2313
|
-
* // }
|
|
2314
|
-
* }
|
|
2315
|
-
*
|
|
2316
|
-
* main().catch(e => {
|
|
2317
|
-
* console.error(e);
|
|
2318
|
-
* throw e;
|
|
2319
|
-
* });
|
|
2320
|
-
*
|
|
2321
|
-
* ```
|
|
2322
1757
|
*
|
|
2323
1758
|
* @param params - Parameters for request
|
|
2324
1759
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2406,126 +1841,6 @@ export namespace storage_v1 {
|
|
|
2406
1841
|
|
|
2407
1842
|
/**
|
|
2408
1843
|
* Creates a new bucket.
|
|
2409
|
-
* @example
|
|
2410
|
-
* ```js
|
|
2411
|
-
* // Before running the sample:
|
|
2412
|
-
* // - Enable the API at:
|
|
2413
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
2414
|
-
* // - Login into gcloud by running:
|
|
2415
|
-
* // `$ gcloud auth application-default login`
|
|
2416
|
-
* // - Install the npm module by running:
|
|
2417
|
-
* // `$ npm install googleapis`
|
|
2418
|
-
*
|
|
2419
|
-
* const {google} = require('googleapis');
|
|
2420
|
-
* const storage = google.storage('v1');
|
|
2421
|
-
*
|
|
2422
|
-
* async function main() {
|
|
2423
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2424
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2425
|
-
* scopes: [
|
|
2426
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2427
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
2428
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
2429
|
-
* ],
|
|
2430
|
-
* });
|
|
2431
|
-
*
|
|
2432
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2433
|
-
* const authClient = await auth.getClient();
|
|
2434
|
-
* google.options({auth: authClient});
|
|
2435
|
-
*
|
|
2436
|
-
* // Do the magic
|
|
2437
|
-
* const res = await storage.buckets.insert({
|
|
2438
|
-
* // Apply a predefined set of access controls to this bucket.
|
|
2439
|
-
* predefinedAcl: 'placeholder-value',
|
|
2440
|
-
* // Apply a predefined set of default object access controls to this bucket.
|
|
2441
|
-
* predefinedDefaultObjectAcl: 'placeholder-value',
|
|
2442
|
-
* // A valid API project identifier.
|
|
2443
|
-
* project: 'placeholder-value',
|
|
2444
|
-
* // Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.
|
|
2445
|
-
* projection: 'placeholder-value',
|
|
2446
|
-
* // The project to be billed for this request.
|
|
2447
|
-
* userProject: 'placeholder-value',
|
|
2448
|
-
*
|
|
2449
|
-
* // Request body metadata
|
|
2450
|
-
* requestBody: {
|
|
2451
|
-
* // request body parameters
|
|
2452
|
-
* // {
|
|
2453
|
-
* // "acl": [],
|
|
2454
|
-
* // "autoclass": {},
|
|
2455
|
-
* // "billing": {},
|
|
2456
|
-
* // "cors": [],
|
|
2457
|
-
* // "customPlacementConfig": {},
|
|
2458
|
-
* // "defaultEventBasedHold": false,
|
|
2459
|
-
* // "defaultObjectAcl": [],
|
|
2460
|
-
* // "encryption": {},
|
|
2461
|
-
* // "etag": "my_etag",
|
|
2462
|
-
* // "iamConfiguration": {},
|
|
2463
|
-
* // "id": "my_id",
|
|
2464
|
-
* // "kind": "my_kind",
|
|
2465
|
-
* // "labels": {},
|
|
2466
|
-
* // "lifecycle": {},
|
|
2467
|
-
* // "location": "my_location",
|
|
2468
|
-
* // "locationType": "my_locationType",
|
|
2469
|
-
* // "logging": {},
|
|
2470
|
-
* // "metageneration": "my_metageneration",
|
|
2471
|
-
* // "name": "my_name",
|
|
2472
|
-
* // "owner": {},
|
|
2473
|
-
* // "projectNumber": "my_projectNumber",
|
|
2474
|
-
* // "retentionPolicy": {},
|
|
2475
|
-
* // "rpo": "my_rpo",
|
|
2476
|
-
* // "satisfiesPZS": false,
|
|
2477
|
-
* // "selfLink": "my_selfLink",
|
|
2478
|
-
* // "storageClass": "my_storageClass",
|
|
2479
|
-
* // "timeCreated": "my_timeCreated",
|
|
2480
|
-
* // "updated": "my_updated",
|
|
2481
|
-
* // "versioning": {},
|
|
2482
|
-
* // "website": {}
|
|
2483
|
-
* // }
|
|
2484
|
-
* },
|
|
2485
|
-
* });
|
|
2486
|
-
* console.log(res.data);
|
|
2487
|
-
*
|
|
2488
|
-
* // Example response
|
|
2489
|
-
* // {
|
|
2490
|
-
* // "acl": [],
|
|
2491
|
-
* // "autoclass": {},
|
|
2492
|
-
* // "billing": {},
|
|
2493
|
-
* // "cors": [],
|
|
2494
|
-
* // "customPlacementConfig": {},
|
|
2495
|
-
* // "defaultEventBasedHold": false,
|
|
2496
|
-
* // "defaultObjectAcl": [],
|
|
2497
|
-
* // "encryption": {},
|
|
2498
|
-
* // "etag": "my_etag",
|
|
2499
|
-
* // "iamConfiguration": {},
|
|
2500
|
-
* // "id": "my_id",
|
|
2501
|
-
* // "kind": "my_kind",
|
|
2502
|
-
* // "labels": {},
|
|
2503
|
-
* // "lifecycle": {},
|
|
2504
|
-
* // "location": "my_location",
|
|
2505
|
-
* // "locationType": "my_locationType",
|
|
2506
|
-
* // "logging": {},
|
|
2507
|
-
* // "metageneration": "my_metageneration",
|
|
2508
|
-
* // "name": "my_name",
|
|
2509
|
-
* // "owner": {},
|
|
2510
|
-
* // "projectNumber": "my_projectNumber",
|
|
2511
|
-
* // "retentionPolicy": {},
|
|
2512
|
-
* // "rpo": "my_rpo",
|
|
2513
|
-
* // "satisfiesPZS": false,
|
|
2514
|
-
* // "selfLink": "my_selfLink",
|
|
2515
|
-
* // "storageClass": "my_storageClass",
|
|
2516
|
-
* // "timeCreated": "my_timeCreated",
|
|
2517
|
-
* // "updated": "my_updated",
|
|
2518
|
-
* // "versioning": {},
|
|
2519
|
-
* // "website": {}
|
|
2520
|
-
* // }
|
|
2521
|
-
* }
|
|
2522
|
-
*
|
|
2523
|
-
* main().catch(e => {
|
|
2524
|
-
* console.error(e);
|
|
2525
|
-
* throw e;
|
|
2526
|
-
* });
|
|
2527
|
-
*
|
|
2528
|
-
* ```
|
|
2529
1844
|
*
|
|
2530
1845
|
* @param params - Parameters for request
|
|
2531
1846
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2609,66 +1924,6 @@ export namespace storage_v1 {
|
|
|
2609
1924
|
|
|
2610
1925
|
/**
|
|
2611
1926
|
* Retrieves a list of buckets for a given project.
|
|
2612
|
-
* @example
|
|
2613
|
-
* ```js
|
|
2614
|
-
* // Before running the sample:
|
|
2615
|
-
* // - Enable the API at:
|
|
2616
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
2617
|
-
* // - Login into gcloud by running:
|
|
2618
|
-
* // `$ gcloud auth application-default login`
|
|
2619
|
-
* // - Install the npm module by running:
|
|
2620
|
-
* // `$ npm install googleapis`
|
|
2621
|
-
*
|
|
2622
|
-
* const {google} = require('googleapis');
|
|
2623
|
-
* const storage = google.storage('v1');
|
|
2624
|
-
*
|
|
2625
|
-
* async function main() {
|
|
2626
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2627
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2628
|
-
* scopes: [
|
|
2629
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2630
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
2631
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
2632
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
2633
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
2634
|
-
* ],
|
|
2635
|
-
* });
|
|
2636
|
-
*
|
|
2637
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2638
|
-
* const authClient = await auth.getClient();
|
|
2639
|
-
* google.options({auth: authClient});
|
|
2640
|
-
*
|
|
2641
|
-
* // Do the magic
|
|
2642
|
-
* const res = await storage.buckets.list({
|
|
2643
|
-
* // Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.
|
|
2644
|
-
* maxResults: 'placeholder-value',
|
|
2645
|
-
* // A previously-returned page token representing part of the larger set of results to view.
|
|
2646
|
-
* pageToken: 'placeholder-value',
|
|
2647
|
-
* // Filter results to buckets whose names begin with this prefix.
|
|
2648
|
-
* prefix: 'placeholder-value',
|
|
2649
|
-
* // A valid API project identifier.
|
|
2650
|
-
* project: 'placeholder-value',
|
|
2651
|
-
* // Set of properties to return. Defaults to noAcl.
|
|
2652
|
-
* projection: 'placeholder-value',
|
|
2653
|
-
* // The project to be billed for this request.
|
|
2654
|
-
* userProject: 'placeholder-value',
|
|
2655
|
-
* });
|
|
2656
|
-
* console.log(res.data);
|
|
2657
|
-
*
|
|
2658
|
-
* // Example response
|
|
2659
|
-
* // {
|
|
2660
|
-
* // "items": [],
|
|
2661
|
-
* // "kind": "my_kind",
|
|
2662
|
-
* // "nextPageToken": "my_nextPageToken"
|
|
2663
|
-
* // }
|
|
2664
|
-
* }
|
|
2665
|
-
*
|
|
2666
|
-
* main().catch(e => {
|
|
2667
|
-
* console.error(e);
|
|
2668
|
-
* throw e;
|
|
2669
|
-
* });
|
|
2670
|
-
*
|
|
2671
|
-
* ```
|
|
2672
1927
|
*
|
|
2673
1928
|
* @param params - Parameters for request
|
|
2674
1929
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2752,85 +2007,6 @@ export namespace storage_v1 {
|
|
|
2752
2007
|
|
|
2753
2008
|
/**
|
|
2754
2009
|
* Locks retention policy on a bucket.
|
|
2755
|
-
* @example
|
|
2756
|
-
* ```js
|
|
2757
|
-
* // Before running the sample:
|
|
2758
|
-
* // - Enable the API at:
|
|
2759
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
2760
|
-
* // - Login into gcloud by running:
|
|
2761
|
-
* // `$ gcloud auth application-default login`
|
|
2762
|
-
* // - Install the npm module by running:
|
|
2763
|
-
* // `$ npm install googleapis`
|
|
2764
|
-
*
|
|
2765
|
-
* const {google} = require('googleapis');
|
|
2766
|
-
* const storage = google.storage('v1');
|
|
2767
|
-
*
|
|
2768
|
-
* async function main() {
|
|
2769
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2770
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2771
|
-
* scopes: [
|
|
2772
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2773
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
2774
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
2775
|
-
* ],
|
|
2776
|
-
* });
|
|
2777
|
-
*
|
|
2778
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2779
|
-
* const authClient = await auth.getClient();
|
|
2780
|
-
* google.options({auth: authClient});
|
|
2781
|
-
*
|
|
2782
|
-
* // Do the magic
|
|
2783
|
-
* const res = await storage.buckets.lockRetentionPolicy({
|
|
2784
|
-
* // Name of a bucket.
|
|
2785
|
-
* bucket: 'placeholder-value',
|
|
2786
|
-
* // Makes the operation conditional on whether bucket's current metageneration matches the given value.
|
|
2787
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
2788
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
2789
|
-
* userProject: 'placeholder-value',
|
|
2790
|
-
* });
|
|
2791
|
-
* console.log(res.data);
|
|
2792
|
-
*
|
|
2793
|
-
* // Example response
|
|
2794
|
-
* // {
|
|
2795
|
-
* // "acl": [],
|
|
2796
|
-
* // "autoclass": {},
|
|
2797
|
-
* // "billing": {},
|
|
2798
|
-
* // "cors": [],
|
|
2799
|
-
* // "customPlacementConfig": {},
|
|
2800
|
-
* // "defaultEventBasedHold": false,
|
|
2801
|
-
* // "defaultObjectAcl": [],
|
|
2802
|
-
* // "encryption": {},
|
|
2803
|
-
* // "etag": "my_etag",
|
|
2804
|
-
* // "iamConfiguration": {},
|
|
2805
|
-
* // "id": "my_id",
|
|
2806
|
-
* // "kind": "my_kind",
|
|
2807
|
-
* // "labels": {},
|
|
2808
|
-
* // "lifecycle": {},
|
|
2809
|
-
* // "location": "my_location",
|
|
2810
|
-
* // "locationType": "my_locationType",
|
|
2811
|
-
* // "logging": {},
|
|
2812
|
-
* // "metageneration": "my_metageneration",
|
|
2813
|
-
* // "name": "my_name",
|
|
2814
|
-
* // "owner": {},
|
|
2815
|
-
* // "projectNumber": "my_projectNumber",
|
|
2816
|
-
* // "retentionPolicy": {},
|
|
2817
|
-
* // "rpo": "my_rpo",
|
|
2818
|
-
* // "satisfiesPZS": false,
|
|
2819
|
-
* // "selfLink": "my_selfLink",
|
|
2820
|
-
* // "storageClass": "my_storageClass",
|
|
2821
|
-
* // "timeCreated": "my_timeCreated",
|
|
2822
|
-
* // "updated": "my_updated",
|
|
2823
|
-
* // "versioning": {},
|
|
2824
|
-
* // "website": {}
|
|
2825
|
-
* // }
|
|
2826
|
-
* }
|
|
2827
|
-
*
|
|
2828
|
-
* main().catch(e => {
|
|
2829
|
-
* console.error(e);
|
|
2830
|
-
* throw e;
|
|
2831
|
-
* });
|
|
2832
|
-
*
|
|
2833
|
-
* ```
|
|
2834
2010
|
*
|
|
2835
2011
|
* @param params - Parameters for request
|
|
2836
2012
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2917,129 +2093,6 @@ export namespace storage_v1 {
|
|
|
2917
2093
|
|
|
2918
2094
|
/**
|
|
2919
2095
|
* Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
|
|
2920
|
-
* @example
|
|
2921
|
-
* ```js
|
|
2922
|
-
* // Before running the sample:
|
|
2923
|
-
* // - Enable the API at:
|
|
2924
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
2925
|
-
* // - Login into gcloud by running:
|
|
2926
|
-
* // `$ gcloud auth application-default login`
|
|
2927
|
-
* // - Install the npm module by running:
|
|
2928
|
-
* // `$ npm install googleapis`
|
|
2929
|
-
*
|
|
2930
|
-
* const {google} = require('googleapis');
|
|
2931
|
-
* const storage = google.storage('v1');
|
|
2932
|
-
*
|
|
2933
|
-
* async function main() {
|
|
2934
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2935
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2936
|
-
* scopes: [
|
|
2937
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2938
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
2939
|
-
* ],
|
|
2940
|
-
* });
|
|
2941
|
-
*
|
|
2942
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2943
|
-
* const authClient = await auth.getClient();
|
|
2944
|
-
* google.options({auth: authClient});
|
|
2945
|
-
*
|
|
2946
|
-
* // Do the magic
|
|
2947
|
-
* const res = await storage.buckets.patch({
|
|
2948
|
-
* // Name of a bucket.
|
|
2949
|
-
* bucket: 'placeholder-value',
|
|
2950
|
-
* // Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
|
|
2951
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
2952
|
-
* // Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
|
|
2953
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
2954
|
-
* // Apply a predefined set of access controls to this bucket.
|
|
2955
|
-
* predefinedAcl: 'placeholder-value',
|
|
2956
|
-
* // Apply a predefined set of default object access controls to this bucket.
|
|
2957
|
-
* predefinedDefaultObjectAcl: 'placeholder-value',
|
|
2958
|
-
* // Set of properties to return. Defaults to full.
|
|
2959
|
-
* projection: 'placeholder-value',
|
|
2960
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
2961
|
-
* userProject: 'placeholder-value',
|
|
2962
|
-
*
|
|
2963
|
-
* // Request body metadata
|
|
2964
|
-
* requestBody: {
|
|
2965
|
-
* // request body parameters
|
|
2966
|
-
* // {
|
|
2967
|
-
* // "acl": [],
|
|
2968
|
-
* // "autoclass": {},
|
|
2969
|
-
* // "billing": {},
|
|
2970
|
-
* // "cors": [],
|
|
2971
|
-
* // "customPlacementConfig": {},
|
|
2972
|
-
* // "defaultEventBasedHold": false,
|
|
2973
|
-
* // "defaultObjectAcl": [],
|
|
2974
|
-
* // "encryption": {},
|
|
2975
|
-
* // "etag": "my_etag",
|
|
2976
|
-
* // "iamConfiguration": {},
|
|
2977
|
-
* // "id": "my_id",
|
|
2978
|
-
* // "kind": "my_kind",
|
|
2979
|
-
* // "labels": {},
|
|
2980
|
-
* // "lifecycle": {},
|
|
2981
|
-
* // "location": "my_location",
|
|
2982
|
-
* // "locationType": "my_locationType",
|
|
2983
|
-
* // "logging": {},
|
|
2984
|
-
* // "metageneration": "my_metageneration",
|
|
2985
|
-
* // "name": "my_name",
|
|
2986
|
-
* // "owner": {},
|
|
2987
|
-
* // "projectNumber": "my_projectNumber",
|
|
2988
|
-
* // "retentionPolicy": {},
|
|
2989
|
-
* // "rpo": "my_rpo",
|
|
2990
|
-
* // "satisfiesPZS": false,
|
|
2991
|
-
* // "selfLink": "my_selfLink",
|
|
2992
|
-
* // "storageClass": "my_storageClass",
|
|
2993
|
-
* // "timeCreated": "my_timeCreated",
|
|
2994
|
-
* // "updated": "my_updated",
|
|
2995
|
-
* // "versioning": {},
|
|
2996
|
-
* // "website": {}
|
|
2997
|
-
* // }
|
|
2998
|
-
* },
|
|
2999
|
-
* });
|
|
3000
|
-
* console.log(res.data);
|
|
3001
|
-
*
|
|
3002
|
-
* // Example response
|
|
3003
|
-
* // {
|
|
3004
|
-
* // "acl": [],
|
|
3005
|
-
* // "autoclass": {},
|
|
3006
|
-
* // "billing": {},
|
|
3007
|
-
* // "cors": [],
|
|
3008
|
-
* // "customPlacementConfig": {},
|
|
3009
|
-
* // "defaultEventBasedHold": false,
|
|
3010
|
-
* // "defaultObjectAcl": [],
|
|
3011
|
-
* // "encryption": {},
|
|
3012
|
-
* // "etag": "my_etag",
|
|
3013
|
-
* // "iamConfiguration": {},
|
|
3014
|
-
* // "id": "my_id",
|
|
3015
|
-
* // "kind": "my_kind",
|
|
3016
|
-
* // "labels": {},
|
|
3017
|
-
* // "lifecycle": {},
|
|
3018
|
-
* // "location": "my_location",
|
|
3019
|
-
* // "locationType": "my_locationType",
|
|
3020
|
-
* // "logging": {},
|
|
3021
|
-
* // "metageneration": "my_metageneration",
|
|
3022
|
-
* // "name": "my_name",
|
|
3023
|
-
* // "owner": {},
|
|
3024
|
-
* // "projectNumber": "my_projectNumber",
|
|
3025
|
-
* // "retentionPolicy": {},
|
|
3026
|
-
* // "rpo": "my_rpo",
|
|
3027
|
-
* // "satisfiesPZS": false,
|
|
3028
|
-
* // "selfLink": "my_selfLink",
|
|
3029
|
-
* // "storageClass": "my_storageClass",
|
|
3030
|
-
* // "timeCreated": "my_timeCreated",
|
|
3031
|
-
* // "updated": "my_updated",
|
|
3032
|
-
* // "versioning": {},
|
|
3033
|
-
* // "website": {}
|
|
3034
|
-
* // }
|
|
3035
|
-
* }
|
|
3036
|
-
*
|
|
3037
|
-
* main().catch(e => {
|
|
3038
|
-
* console.error(e);
|
|
3039
|
-
* throw e;
|
|
3040
|
-
* });
|
|
3041
|
-
*
|
|
3042
|
-
* ```
|
|
3043
2096
|
*
|
|
3044
2097
|
* @param params - Parameters for request
|
|
3045
2098
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3126,69 +2179,6 @@ export namespace storage_v1 {
|
|
|
3126
2179
|
|
|
3127
2180
|
/**
|
|
3128
2181
|
* Updates an IAM policy for the specified bucket.
|
|
3129
|
-
* @example
|
|
3130
|
-
* ```js
|
|
3131
|
-
* // Before running the sample:
|
|
3132
|
-
* // - Enable the API at:
|
|
3133
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
3134
|
-
* // - Login into gcloud by running:
|
|
3135
|
-
* // `$ gcloud auth application-default login`
|
|
3136
|
-
* // - Install the npm module by running:
|
|
3137
|
-
* // `$ npm install googleapis`
|
|
3138
|
-
*
|
|
3139
|
-
* const {google} = require('googleapis');
|
|
3140
|
-
* const storage = google.storage('v1');
|
|
3141
|
-
*
|
|
3142
|
-
* async function main() {
|
|
3143
|
-
* const auth = new google.auth.GoogleAuth({
|
|
3144
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3145
|
-
* scopes: [
|
|
3146
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3147
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
3148
|
-
* ],
|
|
3149
|
-
* });
|
|
3150
|
-
*
|
|
3151
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
3152
|
-
* const authClient = await auth.getClient();
|
|
3153
|
-
* google.options({auth: authClient});
|
|
3154
|
-
*
|
|
3155
|
-
* // Do the magic
|
|
3156
|
-
* const res = await storage.buckets.setIamPolicy({
|
|
3157
|
-
* // Name of a bucket.
|
|
3158
|
-
* bucket: 'placeholder-value',
|
|
3159
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
3160
|
-
* userProject: 'placeholder-value',
|
|
3161
|
-
*
|
|
3162
|
-
* // Request body metadata
|
|
3163
|
-
* requestBody: {
|
|
3164
|
-
* // request body parameters
|
|
3165
|
-
* // {
|
|
3166
|
-
* // "bindings": [],
|
|
3167
|
-
* // "etag": "my_etag",
|
|
3168
|
-
* // "kind": "my_kind",
|
|
3169
|
-
* // "resourceId": "my_resourceId",
|
|
3170
|
-
* // "version": 0
|
|
3171
|
-
* // }
|
|
3172
|
-
* },
|
|
3173
|
-
* });
|
|
3174
|
-
* console.log(res.data);
|
|
3175
|
-
*
|
|
3176
|
-
* // Example response
|
|
3177
|
-
* // {
|
|
3178
|
-
* // "bindings": [],
|
|
3179
|
-
* // "etag": "my_etag",
|
|
3180
|
-
* // "kind": "my_kind",
|
|
3181
|
-
* // "resourceId": "my_resourceId",
|
|
3182
|
-
* // "version": 0
|
|
3183
|
-
* // }
|
|
3184
|
-
* }
|
|
3185
|
-
*
|
|
3186
|
-
* main().catch(e => {
|
|
3187
|
-
* console.error(e);
|
|
3188
|
-
* throw e;
|
|
3189
|
-
* });
|
|
3190
|
-
*
|
|
3191
|
-
* ```
|
|
3192
2182
|
*
|
|
3193
2183
|
* @param params - Parameters for request
|
|
3194
2184
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3276,59 +2266,6 @@ export namespace storage_v1 {
|
|
|
3276
2266
|
|
|
3277
2267
|
/**
|
|
3278
2268
|
* Tests a set of permissions on the given bucket to see which, if any, are held by the caller.
|
|
3279
|
-
* @example
|
|
3280
|
-
* ```js
|
|
3281
|
-
* // Before running the sample:
|
|
3282
|
-
* // - Enable the API at:
|
|
3283
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
3284
|
-
* // - Login into gcloud by running:
|
|
3285
|
-
* // `$ gcloud auth application-default login`
|
|
3286
|
-
* // - Install the npm module by running:
|
|
3287
|
-
* // `$ npm install googleapis`
|
|
3288
|
-
*
|
|
3289
|
-
* const {google} = require('googleapis');
|
|
3290
|
-
* const storage = google.storage('v1');
|
|
3291
|
-
*
|
|
3292
|
-
* async function main() {
|
|
3293
|
-
* const auth = new google.auth.GoogleAuth({
|
|
3294
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3295
|
-
* scopes: [
|
|
3296
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3297
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
3298
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
3299
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
3300
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
3301
|
-
* ],
|
|
3302
|
-
* });
|
|
3303
|
-
*
|
|
3304
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
3305
|
-
* const authClient = await auth.getClient();
|
|
3306
|
-
* google.options({auth: authClient});
|
|
3307
|
-
*
|
|
3308
|
-
* // Do the magic
|
|
3309
|
-
* const res = await storage.buckets.testIamPermissions({
|
|
3310
|
-
* // Name of a bucket.
|
|
3311
|
-
* bucket: 'placeholder-value',
|
|
3312
|
-
* // Permissions to test.
|
|
3313
|
-
* permissions: 'placeholder-value',
|
|
3314
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
3315
|
-
* userProject: 'placeholder-value',
|
|
3316
|
-
* });
|
|
3317
|
-
* console.log(res.data);
|
|
3318
|
-
*
|
|
3319
|
-
* // Example response
|
|
3320
|
-
* // {
|
|
3321
|
-
* // "kind": "my_kind",
|
|
3322
|
-
* // "permissions": []
|
|
3323
|
-
* // }
|
|
3324
|
-
* }
|
|
3325
|
-
*
|
|
3326
|
-
* main().catch(e => {
|
|
3327
|
-
* console.error(e);
|
|
3328
|
-
* throw e;
|
|
3329
|
-
* });
|
|
3330
|
-
*
|
|
3331
|
-
* ```
|
|
3332
2269
|
*
|
|
3333
2270
|
* @param params - Parameters for request
|
|
3334
2271
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3422,129 +2359,6 @@ export namespace storage_v1 {
|
|
|
3422
2359
|
|
|
3423
2360
|
/**
|
|
3424
2361
|
* Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
|
|
3425
|
-
* @example
|
|
3426
|
-
* ```js
|
|
3427
|
-
* // Before running the sample:
|
|
3428
|
-
* // - Enable the API at:
|
|
3429
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
3430
|
-
* // - Login into gcloud by running:
|
|
3431
|
-
* // `$ gcloud auth application-default login`
|
|
3432
|
-
* // - Install the npm module by running:
|
|
3433
|
-
* // `$ npm install googleapis`
|
|
3434
|
-
*
|
|
3435
|
-
* const {google} = require('googleapis');
|
|
3436
|
-
* const storage = google.storage('v1');
|
|
3437
|
-
*
|
|
3438
|
-
* async function main() {
|
|
3439
|
-
* const auth = new google.auth.GoogleAuth({
|
|
3440
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3441
|
-
* scopes: [
|
|
3442
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3443
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
3444
|
-
* ],
|
|
3445
|
-
* });
|
|
3446
|
-
*
|
|
3447
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
3448
|
-
* const authClient = await auth.getClient();
|
|
3449
|
-
* google.options({auth: authClient});
|
|
3450
|
-
*
|
|
3451
|
-
* // Do the magic
|
|
3452
|
-
* const res = await storage.buckets.update({
|
|
3453
|
-
* // Name of a bucket.
|
|
3454
|
-
* bucket: 'placeholder-value',
|
|
3455
|
-
* // Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
|
|
3456
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
3457
|
-
* // Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
|
|
3458
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
3459
|
-
* // Apply a predefined set of access controls to this bucket.
|
|
3460
|
-
* predefinedAcl: 'placeholder-value',
|
|
3461
|
-
* // Apply a predefined set of default object access controls to this bucket.
|
|
3462
|
-
* predefinedDefaultObjectAcl: 'placeholder-value',
|
|
3463
|
-
* // Set of properties to return. Defaults to full.
|
|
3464
|
-
* projection: 'placeholder-value',
|
|
3465
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
3466
|
-
* userProject: 'placeholder-value',
|
|
3467
|
-
*
|
|
3468
|
-
* // Request body metadata
|
|
3469
|
-
* requestBody: {
|
|
3470
|
-
* // request body parameters
|
|
3471
|
-
* // {
|
|
3472
|
-
* // "acl": [],
|
|
3473
|
-
* // "autoclass": {},
|
|
3474
|
-
* // "billing": {},
|
|
3475
|
-
* // "cors": [],
|
|
3476
|
-
* // "customPlacementConfig": {},
|
|
3477
|
-
* // "defaultEventBasedHold": false,
|
|
3478
|
-
* // "defaultObjectAcl": [],
|
|
3479
|
-
* // "encryption": {},
|
|
3480
|
-
* // "etag": "my_etag",
|
|
3481
|
-
* // "iamConfiguration": {},
|
|
3482
|
-
* // "id": "my_id",
|
|
3483
|
-
* // "kind": "my_kind",
|
|
3484
|
-
* // "labels": {},
|
|
3485
|
-
* // "lifecycle": {},
|
|
3486
|
-
* // "location": "my_location",
|
|
3487
|
-
* // "locationType": "my_locationType",
|
|
3488
|
-
* // "logging": {},
|
|
3489
|
-
* // "metageneration": "my_metageneration",
|
|
3490
|
-
* // "name": "my_name",
|
|
3491
|
-
* // "owner": {},
|
|
3492
|
-
* // "projectNumber": "my_projectNumber",
|
|
3493
|
-
* // "retentionPolicy": {},
|
|
3494
|
-
* // "rpo": "my_rpo",
|
|
3495
|
-
* // "satisfiesPZS": false,
|
|
3496
|
-
* // "selfLink": "my_selfLink",
|
|
3497
|
-
* // "storageClass": "my_storageClass",
|
|
3498
|
-
* // "timeCreated": "my_timeCreated",
|
|
3499
|
-
* // "updated": "my_updated",
|
|
3500
|
-
* // "versioning": {},
|
|
3501
|
-
* // "website": {}
|
|
3502
|
-
* // }
|
|
3503
|
-
* },
|
|
3504
|
-
* });
|
|
3505
|
-
* console.log(res.data);
|
|
3506
|
-
*
|
|
3507
|
-
* // Example response
|
|
3508
|
-
* // {
|
|
3509
|
-
* // "acl": [],
|
|
3510
|
-
* // "autoclass": {},
|
|
3511
|
-
* // "billing": {},
|
|
3512
|
-
* // "cors": [],
|
|
3513
|
-
* // "customPlacementConfig": {},
|
|
3514
|
-
* // "defaultEventBasedHold": false,
|
|
3515
|
-
* // "defaultObjectAcl": [],
|
|
3516
|
-
* // "encryption": {},
|
|
3517
|
-
* // "etag": "my_etag",
|
|
3518
|
-
* // "iamConfiguration": {},
|
|
3519
|
-
* // "id": "my_id",
|
|
3520
|
-
* // "kind": "my_kind",
|
|
3521
|
-
* // "labels": {},
|
|
3522
|
-
* // "lifecycle": {},
|
|
3523
|
-
* // "location": "my_location",
|
|
3524
|
-
* // "locationType": "my_locationType",
|
|
3525
|
-
* // "logging": {},
|
|
3526
|
-
* // "metageneration": "my_metageneration",
|
|
3527
|
-
* // "name": "my_name",
|
|
3528
|
-
* // "owner": {},
|
|
3529
|
-
* // "projectNumber": "my_projectNumber",
|
|
3530
|
-
* // "retentionPolicy": {},
|
|
3531
|
-
* // "rpo": "my_rpo",
|
|
3532
|
-
* // "satisfiesPZS": false,
|
|
3533
|
-
* // "selfLink": "my_selfLink",
|
|
3534
|
-
* // "storageClass": "my_storageClass",
|
|
3535
|
-
* // "timeCreated": "my_timeCreated",
|
|
3536
|
-
* // "updated": "my_updated",
|
|
3537
|
-
* // "versioning": {},
|
|
3538
|
-
* // "website": {}
|
|
3539
|
-
* // }
|
|
3540
|
-
* }
|
|
3541
|
-
*
|
|
3542
|
-
* main().catch(e => {
|
|
3543
|
-
* console.error(e);
|
|
3544
|
-
* throw e;
|
|
3545
|
-
* });
|
|
3546
|
-
*
|
|
3547
|
-
* ```
|
|
3548
2362
|
*
|
|
3549
2363
|
* @param params - Parameters for request
|
|
3550
2364
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3863,63 +2677,6 @@ export namespace storage_v1 {
|
|
|
3863
2677
|
|
|
3864
2678
|
/**
|
|
3865
2679
|
* Stop watching resources through this channel
|
|
3866
|
-
* @example
|
|
3867
|
-
* ```js
|
|
3868
|
-
* // Before running the sample:
|
|
3869
|
-
* // - Enable the API at:
|
|
3870
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
3871
|
-
* // - Login into gcloud by running:
|
|
3872
|
-
* // `$ gcloud auth application-default login`
|
|
3873
|
-
* // - Install the npm module by running:
|
|
3874
|
-
* // `$ npm install googleapis`
|
|
3875
|
-
*
|
|
3876
|
-
* const {google} = require('googleapis');
|
|
3877
|
-
* const storage = google.storage('v1');
|
|
3878
|
-
*
|
|
3879
|
-
* async function main() {
|
|
3880
|
-
* const auth = new google.auth.GoogleAuth({
|
|
3881
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3882
|
-
* scopes: [
|
|
3883
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3884
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
3885
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
3886
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
3887
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
3888
|
-
* ],
|
|
3889
|
-
* });
|
|
3890
|
-
*
|
|
3891
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
3892
|
-
* const authClient = await auth.getClient();
|
|
3893
|
-
* google.options({auth: authClient});
|
|
3894
|
-
*
|
|
3895
|
-
* // Do the magic
|
|
3896
|
-
* const res = await storage.channels.stop({
|
|
3897
|
-
* // Request body metadata
|
|
3898
|
-
* requestBody: {
|
|
3899
|
-
* // request body parameters
|
|
3900
|
-
* // {
|
|
3901
|
-
* // "address": "my_address",
|
|
3902
|
-
* // "expiration": "my_expiration",
|
|
3903
|
-
* // "id": "my_id",
|
|
3904
|
-
* // "kind": "my_kind",
|
|
3905
|
-
* // "params": {},
|
|
3906
|
-
* // "payload": false,
|
|
3907
|
-
* // "resourceId": "my_resourceId",
|
|
3908
|
-
* // "resourceUri": "my_resourceUri",
|
|
3909
|
-
* // "token": "my_token",
|
|
3910
|
-
* // "type": "my_type"
|
|
3911
|
-
* // }
|
|
3912
|
-
* },
|
|
3913
|
-
* });
|
|
3914
|
-
* console.log(res.data);
|
|
3915
|
-
* }
|
|
3916
|
-
*
|
|
3917
|
-
* main().catch(e => {
|
|
3918
|
-
* console.error(e);
|
|
3919
|
-
* throw e;
|
|
3920
|
-
* });
|
|
3921
|
-
*
|
|
3922
|
-
* ```
|
|
3923
2680
|
*
|
|
3924
2681
|
* @param params - Parameters for request
|
|
3925
2682
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4018,50 +2775,6 @@ export namespace storage_v1 {
|
|
|
4018
2775
|
|
|
4019
2776
|
/**
|
|
4020
2777
|
* Permanently deletes the default object ACL entry for the specified entity on the specified bucket.
|
|
4021
|
-
* @example
|
|
4022
|
-
* ```js
|
|
4023
|
-
* // Before running the sample:
|
|
4024
|
-
* // - Enable the API at:
|
|
4025
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
4026
|
-
* // - Login into gcloud by running:
|
|
4027
|
-
* // `$ gcloud auth application-default login`
|
|
4028
|
-
* // - Install the npm module by running:
|
|
4029
|
-
* // `$ npm install googleapis`
|
|
4030
|
-
*
|
|
4031
|
-
* const {google} = require('googleapis');
|
|
4032
|
-
* const storage = google.storage('v1');
|
|
4033
|
-
*
|
|
4034
|
-
* async function main() {
|
|
4035
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4036
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4037
|
-
* scopes: [
|
|
4038
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4039
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
4040
|
-
* ],
|
|
4041
|
-
* });
|
|
4042
|
-
*
|
|
4043
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4044
|
-
* const authClient = await auth.getClient();
|
|
4045
|
-
* google.options({auth: authClient});
|
|
4046
|
-
*
|
|
4047
|
-
* // Do the magic
|
|
4048
|
-
* const res = await storage.defaultObjectAccessControls.delete({
|
|
4049
|
-
* // Name of a bucket.
|
|
4050
|
-
* bucket: 'placeholder-value',
|
|
4051
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
4052
|
-
* entity: 'placeholder-value',
|
|
4053
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
4054
|
-
* userProject: 'placeholder-value',
|
|
4055
|
-
* });
|
|
4056
|
-
* console.log(res.data);
|
|
4057
|
-
* }
|
|
4058
|
-
*
|
|
4059
|
-
* main().catch(e => {
|
|
4060
|
-
* console.error(e);
|
|
4061
|
-
* throw e;
|
|
4062
|
-
* });
|
|
4063
|
-
*
|
|
4064
|
-
* ```
|
|
4065
2778
|
*
|
|
4066
2779
|
* @param params - Parameters for request
|
|
4067
2780
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4146,67 +2859,6 @@ export namespace storage_v1 {
|
|
|
4146
2859
|
|
|
4147
2860
|
/**
|
|
4148
2861
|
* Returns the default object ACL entry for the specified entity on the specified bucket.
|
|
4149
|
-
* @example
|
|
4150
|
-
* ```js
|
|
4151
|
-
* // Before running the sample:
|
|
4152
|
-
* // - Enable the API at:
|
|
4153
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
4154
|
-
* // - Login into gcloud by running:
|
|
4155
|
-
* // `$ gcloud auth application-default login`
|
|
4156
|
-
* // - Install the npm module by running:
|
|
4157
|
-
* // `$ npm install googleapis`
|
|
4158
|
-
*
|
|
4159
|
-
* const {google} = require('googleapis');
|
|
4160
|
-
* const storage = google.storage('v1');
|
|
4161
|
-
*
|
|
4162
|
-
* async function main() {
|
|
4163
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4164
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4165
|
-
* scopes: [
|
|
4166
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4167
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
4168
|
-
* ],
|
|
4169
|
-
* });
|
|
4170
|
-
*
|
|
4171
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4172
|
-
* const authClient = await auth.getClient();
|
|
4173
|
-
* google.options({auth: authClient});
|
|
4174
|
-
*
|
|
4175
|
-
* // Do the magic
|
|
4176
|
-
* const res = await storage.defaultObjectAccessControls.get({
|
|
4177
|
-
* // Name of a bucket.
|
|
4178
|
-
* bucket: 'placeholder-value',
|
|
4179
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
4180
|
-
* entity: 'placeholder-value',
|
|
4181
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
4182
|
-
* userProject: 'placeholder-value',
|
|
4183
|
-
* });
|
|
4184
|
-
* console.log(res.data);
|
|
4185
|
-
*
|
|
4186
|
-
* // Example response
|
|
4187
|
-
* // {
|
|
4188
|
-
* // "bucket": "my_bucket",
|
|
4189
|
-
* // "domain": "my_domain",
|
|
4190
|
-
* // "email": "my_email",
|
|
4191
|
-
* // "entity": "my_entity",
|
|
4192
|
-
* // "entityId": "my_entityId",
|
|
4193
|
-
* // "etag": "my_etag",
|
|
4194
|
-
* // "generation": "my_generation",
|
|
4195
|
-
* // "id": "my_id",
|
|
4196
|
-
* // "kind": "my_kind",
|
|
4197
|
-
* // "object": "my_object",
|
|
4198
|
-
* // "projectTeam": {},
|
|
4199
|
-
* // "role": "my_role",
|
|
4200
|
-
* // "selfLink": "my_selfLink"
|
|
4201
|
-
* // }
|
|
4202
|
-
* }
|
|
4203
|
-
*
|
|
4204
|
-
* main().catch(e => {
|
|
4205
|
-
* console.error(e);
|
|
4206
|
-
* throw e;
|
|
4207
|
-
* });
|
|
4208
|
-
*
|
|
4209
|
-
* ```
|
|
4210
2862
|
*
|
|
4211
2863
|
* @param params - Parameters for request
|
|
4212
2864
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4296,85 +2948,6 @@ export namespace storage_v1 {
|
|
|
4296
2948
|
|
|
4297
2949
|
/**
|
|
4298
2950
|
* Creates a new default object ACL entry on the specified bucket.
|
|
4299
|
-
* @example
|
|
4300
|
-
* ```js
|
|
4301
|
-
* // Before running the sample:
|
|
4302
|
-
* // - Enable the API at:
|
|
4303
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
4304
|
-
* // - Login into gcloud by running:
|
|
4305
|
-
* // `$ gcloud auth application-default login`
|
|
4306
|
-
* // - Install the npm module by running:
|
|
4307
|
-
* // `$ npm install googleapis`
|
|
4308
|
-
*
|
|
4309
|
-
* const {google} = require('googleapis');
|
|
4310
|
-
* const storage = google.storage('v1');
|
|
4311
|
-
*
|
|
4312
|
-
* async function main() {
|
|
4313
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4314
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4315
|
-
* scopes: [
|
|
4316
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4317
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
4318
|
-
* ],
|
|
4319
|
-
* });
|
|
4320
|
-
*
|
|
4321
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4322
|
-
* const authClient = await auth.getClient();
|
|
4323
|
-
* google.options({auth: authClient});
|
|
4324
|
-
*
|
|
4325
|
-
* // Do the magic
|
|
4326
|
-
* const res = await storage.defaultObjectAccessControls.insert({
|
|
4327
|
-
* // Name of a bucket.
|
|
4328
|
-
* bucket: 'placeholder-value',
|
|
4329
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
4330
|
-
* userProject: 'placeholder-value',
|
|
4331
|
-
*
|
|
4332
|
-
* // Request body metadata
|
|
4333
|
-
* requestBody: {
|
|
4334
|
-
* // request body parameters
|
|
4335
|
-
* // {
|
|
4336
|
-
* // "bucket": "my_bucket",
|
|
4337
|
-
* // "domain": "my_domain",
|
|
4338
|
-
* // "email": "my_email",
|
|
4339
|
-
* // "entity": "my_entity",
|
|
4340
|
-
* // "entityId": "my_entityId",
|
|
4341
|
-
* // "etag": "my_etag",
|
|
4342
|
-
* // "generation": "my_generation",
|
|
4343
|
-
* // "id": "my_id",
|
|
4344
|
-
* // "kind": "my_kind",
|
|
4345
|
-
* // "object": "my_object",
|
|
4346
|
-
* // "projectTeam": {},
|
|
4347
|
-
* // "role": "my_role",
|
|
4348
|
-
* // "selfLink": "my_selfLink"
|
|
4349
|
-
* // }
|
|
4350
|
-
* },
|
|
4351
|
-
* });
|
|
4352
|
-
* console.log(res.data);
|
|
4353
|
-
*
|
|
4354
|
-
* // Example response
|
|
4355
|
-
* // {
|
|
4356
|
-
* // "bucket": "my_bucket",
|
|
4357
|
-
* // "domain": "my_domain",
|
|
4358
|
-
* // "email": "my_email",
|
|
4359
|
-
* // "entity": "my_entity",
|
|
4360
|
-
* // "entityId": "my_entityId",
|
|
4361
|
-
* // "etag": "my_etag",
|
|
4362
|
-
* // "generation": "my_generation",
|
|
4363
|
-
* // "id": "my_id",
|
|
4364
|
-
* // "kind": "my_kind",
|
|
4365
|
-
* // "object": "my_object",
|
|
4366
|
-
* // "projectTeam": {},
|
|
4367
|
-
* // "role": "my_role",
|
|
4368
|
-
* // "selfLink": "my_selfLink"
|
|
4369
|
-
* // }
|
|
4370
|
-
* }
|
|
4371
|
-
*
|
|
4372
|
-
* main().catch(e => {
|
|
4373
|
-
* console.error(e);
|
|
4374
|
-
* throw e;
|
|
4375
|
-
* });
|
|
4376
|
-
*
|
|
4377
|
-
* ```
|
|
4378
2951
|
*
|
|
4379
2952
|
* @param params - Parameters for request
|
|
4380
2953
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4465,58 +3038,6 @@ export namespace storage_v1 {
|
|
|
4465
3038
|
|
|
4466
3039
|
/**
|
|
4467
3040
|
* Retrieves default object ACL entries on the specified bucket.
|
|
4468
|
-
* @example
|
|
4469
|
-
* ```js
|
|
4470
|
-
* // Before running the sample:
|
|
4471
|
-
* // - Enable the API at:
|
|
4472
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
4473
|
-
* // - Login into gcloud by running:
|
|
4474
|
-
* // `$ gcloud auth application-default login`
|
|
4475
|
-
* // - Install the npm module by running:
|
|
4476
|
-
* // `$ npm install googleapis`
|
|
4477
|
-
*
|
|
4478
|
-
* const {google} = require('googleapis');
|
|
4479
|
-
* const storage = google.storage('v1');
|
|
4480
|
-
*
|
|
4481
|
-
* async function main() {
|
|
4482
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4483
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4484
|
-
* scopes: [
|
|
4485
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4486
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
4487
|
-
* ],
|
|
4488
|
-
* });
|
|
4489
|
-
*
|
|
4490
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4491
|
-
* const authClient = await auth.getClient();
|
|
4492
|
-
* google.options({auth: authClient});
|
|
4493
|
-
*
|
|
4494
|
-
* // Do the magic
|
|
4495
|
-
* const res = await storage.defaultObjectAccessControls.list({
|
|
4496
|
-
* // Name of a bucket.
|
|
4497
|
-
* bucket: 'placeholder-value',
|
|
4498
|
-
* // If present, only return default ACL listing if the bucket's current metageneration matches this value.
|
|
4499
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
4500
|
-
* // If present, only return default ACL listing if the bucket's current metageneration does not match the given value.
|
|
4501
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
4502
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
4503
|
-
* userProject: 'placeholder-value',
|
|
4504
|
-
* });
|
|
4505
|
-
* console.log(res.data);
|
|
4506
|
-
*
|
|
4507
|
-
* // Example response
|
|
4508
|
-
* // {
|
|
4509
|
-
* // "items": [],
|
|
4510
|
-
* // "kind": "my_kind"
|
|
4511
|
-
* // }
|
|
4512
|
-
* }
|
|
4513
|
-
*
|
|
4514
|
-
* main().catch(e => {
|
|
4515
|
-
* console.error(e);
|
|
4516
|
-
* throw e;
|
|
4517
|
-
* });
|
|
4518
|
-
*
|
|
4519
|
-
* ```
|
|
4520
3041
|
*
|
|
4521
3042
|
* @param params - Parameters for request
|
|
4522
3043
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4609,87 +3130,6 @@ export namespace storage_v1 {
|
|
|
4609
3130
|
|
|
4610
3131
|
/**
|
|
4611
3132
|
* Patches a default object ACL entry on the specified bucket.
|
|
4612
|
-
* @example
|
|
4613
|
-
* ```js
|
|
4614
|
-
* // Before running the sample:
|
|
4615
|
-
* // - Enable the API at:
|
|
4616
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
4617
|
-
* // - Login into gcloud by running:
|
|
4618
|
-
* // `$ gcloud auth application-default login`
|
|
4619
|
-
* // - Install the npm module by running:
|
|
4620
|
-
* // `$ npm install googleapis`
|
|
4621
|
-
*
|
|
4622
|
-
* const {google} = require('googleapis');
|
|
4623
|
-
* const storage = google.storage('v1');
|
|
4624
|
-
*
|
|
4625
|
-
* async function main() {
|
|
4626
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4627
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4628
|
-
* scopes: [
|
|
4629
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4630
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
4631
|
-
* ],
|
|
4632
|
-
* });
|
|
4633
|
-
*
|
|
4634
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4635
|
-
* const authClient = await auth.getClient();
|
|
4636
|
-
* google.options({auth: authClient});
|
|
4637
|
-
*
|
|
4638
|
-
* // Do the magic
|
|
4639
|
-
* const res = await storage.defaultObjectAccessControls.patch({
|
|
4640
|
-
* // Name of a bucket.
|
|
4641
|
-
* bucket: 'placeholder-value',
|
|
4642
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
4643
|
-
* entity: 'placeholder-value',
|
|
4644
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
4645
|
-
* userProject: 'placeholder-value',
|
|
4646
|
-
*
|
|
4647
|
-
* // Request body metadata
|
|
4648
|
-
* requestBody: {
|
|
4649
|
-
* // request body parameters
|
|
4650
|
-
* // {
|
|
4651
|
-
* // "bucket": "my_bucket",
|
|
4652
|
-
* // "domain": "my_domain",
|
|
4653
|
-
* // "email": "my_email",
|
|
4654
|
-
* // "entity": "my_entity",
|
|
4655
|
-
* // "entityId": "my_entityId",
|
|
4656
|
-
* // "etag": "my_etag",
|
|
4657
|
-
* // "generation": "my_generation",
|
|
4658
|
-
* // "id": "my_id",
|
|
4659
|
-
* // "kind": "my_kind",
|
|
4660
|
-
* // "object": "my_object",
|
|
4661
|
-
* // "projectTeam": {},
|
|
4662
|
-
* // "role": "my_role",
|
|
4663
|
-
* // "selfLink": "my_selfLink"
|
|
4664
|
-
* // }
|
|
4665
|
-
* },
|
|
4666
|
-
* });
|
|
4667
|
-
* console.log(res.data);
|
|
4668
|
-
*
|
|
4669
|
-
* // Example response
|
|
4670
|
-
* // {
|
|
4671
|
-
* // "bucket": "my_bucket",
|
|
4672
|
-
* // "domain": "my_domain",
|
|
4673
|
-
* // "email": "my_email",
|
|
4674
|
-
* // "entity": "my_entity",
|
|
4675
|
-
* // "entityId": "my_entityId",
|
|
4676
|
-
* // "etag": "my_etag",
|
|
4677
|
-
* // "generation": "my_generation",
|
|
4678
|
-
* // "id": "my_id",
|
|
4679
|
-
* // "kind": "my_kind",
|
|
4680
|
-
* // "object": "my_object",
|
|
4681
|
-
* // "projectTeam": {},
|
|
4682
|
-
* // "role": "my_role",
|
|
4683
|
-
* // "selfLink": "my_selfLink"
|
|
4684
|
-
* // }
|
|
4685
|
-
* }
|
|
4686
|
-
*
|
|
4687
|
-
* main().catch(e => {
|
|
4688
|
-
* console.error(e);
|
|
4689
|
-
* throw e;
|
|
4690
|
-
* });
|
|
4691
|
-
*
|
|
4692
|
-
* ```
|
|
4693
3133
|
*
|
|
4694
3134
|
* @param params - Parameters for request
|
|
4695
3135
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4779,87 +3219,6 @@ export namespace storage_v1 {
|
|
|
4779
3219
|
|
|
4780
3220
|
/**
|
|
4781
3221
|
* Updates a default object ACL entry on the specified bucket.
|
|
4782
|
-
* @example
|
|
4783
|
-
* ```js
|
|
4784
|
-
* // Before running the sample:
|
|
4785
|
-
* // - Enable the API at:
|
|
4786
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
4787
|
-
* // - Login into gcloud by running:
|
|
4788
|
-
* // `$ gcloud auth application-default login`
|
|
4789
|
-
* // - Install the npm module by running:
|
|
4790
|
-
* // `$ npm install googleapis`
|
|
4791
|
-
*
|
|
4792
|
-
* const {google} = require('googleapis');
|
|
4793
|
-
* const storage = google.storage('v1');
|
|
4794
|
-
*
|
|
4795
|
-
* async function main() {
|
|
4796
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4797
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4798
|
-
* scopes: [
|
|
4799
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4800
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
4801
|
-
* ],
|
|
4802
|
-
* });
|
|
4803
|
-
*
|
|
4804
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4805
|
-
* const authClient = await auth.getClient();
|
|
4806
|
-
* google.options({auth: authClient});
|
|
4807
|
-
*
|
|
4808
|
-
* // Do the magic
|
|
4809
|
-
* const res = await storage.defaultObjectAccessControls.update({
|
|
4810
|
-
* // Name of a bucket.
|
|
4811
|
-
* bucket: 'placeholder-value',
|
|
4812
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
4813
|
-
* entity: 'placeholder-value',
|
|
4814
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
4815
|
-
* userProject: 'placeholder-value',
|
|
4816
|
-
*
|
|
4817
|
-
* // Request body metadata
|
|
4818
|
-
* requestBody: {
|
|
4819
|
-
* // request body parameters
|
|
4820
|
-
* // {
|
|
4821
|
-
* // "bucket": "my_bucket",
|
|
4822
|
-
* // "domain": "my_domain",
|
|
4823
|
-
* // "email": "my_email",
|
|
4824
|
-
* // "entity": "my_entity",
|
|
4825
|
-
* // "entityId": "my_entityId",
|
|
4826
|
-
* // "etag": "my_etag",
|
|
4827
|
-
* // "generation": "my_generation",
|
|
4828
|
-
* // "id": "my_id",
|
|
4829
|
-
* // "kind": "my_kind",
|
|
4830
|
-
* // "object": "my_object",
|
|
4831
|
-
* // "projectTeam": {},
|
|
4832
|
-
* // "role": "my_role",
|
|
4833
|
-
* // "selfLink": "my_selfLink"
|
|
4834
|
-
* // }
|
|
4835
|
-
* },
|
|
4836
|
-
* });
|
|
4837
|
-
* console.log(res.data);
|
|
4838
|
-
*
|
|
4839
|
-
* // Example response
|
|
4840
|
-
* // {
|
|
4841
|
-
* // "bucket": "my_bucket",
|
|
4842
|
-
* // "domain": "my_domain",
|
|
4843
|
-
* // "email": "my_email",
|
|
4844
|
-
* // "entity": "my_entity",
|
|
4845
|
-
* // "entityId": "my_entityId",
|
|
4846
|
-
* // "etag": "my_etag",
|
|
4847
|
-
* // "generation": "my_generation",
|
|
4848
|
-
* // "id": "my_id",
|
|
4849
|
-
* // "kind": "my_kind",
|
|
4850
|
-
* // "object": "my_object",
|
|
4851
|
-
* // "projectTeam": {},
|
|
4852
|
-
* // "role": "my_role",
|
|
4853
|
-
* // "selfLink": "my_selfLink"
|
|
4854
|
-
* // }
|
|
4855
|
-
* }
|
|
4856
|
-
*
|
|
4857
|
-
* main().catch(e => {
|
|
4858
|
-
* console.error(e);
|
|
4859
|
-
* throw e;
|
|
4860
|
-
* });
|
|
4861
|
-
*
|
|
4862
|
-
* ```
|
|
4863
3222
|
*
|
|
4864
3223
|
* @param params - Parameters for request
|
|
4865
3224
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5062,51 +3421,6 @@ export namespace storage_v1 {
|
|
|
5062
3421
|
|
|
5063
3422
|
/**
|
|
5064
3423
|
* Permanently deletes a notification subscription.
|
|
5065
|
-
* @example
|
|
5066
|
-
* ```js
|
|
5067
|
-
* // Before running the sample:
|
|
5068
|
-
* // - Enable the API at:
|
|
5069
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5070
|
-
* // - Login into gcloud by running:
|
|
5071
|
-
* // `$ gcloud auth application-default login`
|
|
5072
|
-
* // - Install the npm module by running:
|
|
5073
|
-
* // `$ npm install googleapis`
|
|
5074
|
-
*
|
|
5075
|
-
* const {google} = require('googleapis');
|
|
5076
|
-
* const storage = google.storage('v1');
|
|
5077
|
-
*
|
|
5078
|
-
* async function main() {
|
|
5079
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5080
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5081
|
-
* scopes: [
|
|
5082
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5083
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
5084
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
5085
|
-
* ],
|
|
5086
|
-
* });
|
|
5087
|
-
*
|
|
5088
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5089
|
-
* const authClient = await auth.getClient();
|
|
5090
|
-
* google.options({auth: authClient});
|
|
5091
|
-
*
|
|
5092
|
-
* // Do the magic
|
|
5093
|
-
* const res = await storage.notifications.delete({
|
|
5094
|
-
* // The parent bucket of the notification.
|
|
5095
|
-
* bucket: 'placeholder-value',
|
|
5096
|
-
* // ID of the notification to delete.
|
|
5097
|
-
* notification: 'placeholder-value',
|
|
5098
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
5099
|
-
* userProject: 'placeholder-value',
|
|
5100
|
-
* });
|
|
5101
|
-
* console.log(res.data);
|
|
5102
|
-
* }
|
|
5103
|
-
*
|
|
5104
|
-
* main().catch(e => {
|
|
5105
|
-
* console.error(e);
|
|
5106
|
-
* throw e;
|
|
5107
|
-
* });
|
|
5108
|
-
*
|
|
5109
|
-
* ```
|
|
5110
3424
|
*
|
|
5111
3425
|
* @param params - Parameters for request
|
|
5112
3426
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5192,66 +3506,6 @@ export namespace storage_v1 {
|
|
|
5192
3506
|
|
|
5193
3507
|
/**
|
|
5194
3508
|
* View a notification configuration.
|
|
5195
|
-
* @example
|
|
5196
|
-
* ```js
|
|
5197
|
-
* // Before running the sample:
|
|
5198
|
-
* // - Enable the API at:
|
|
5199
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5200
|
-
* // - Login into gcloud by running:
|
|
5201
|
-
* // `$ gcloud auth application-default login`
|
|
5202
|
-
* // - Install the npm module by running:
|
|
5203
|
-
* // `$ npm install googleapis`
|
|
5204
|
-
*
|
|
5205
|
-
* const {google} = require('googleapis');
|
|
5206
|
-
* const storage = google.storage('v1');
|
|
5207
|
-
*
|
|
5208
|
-
* async function main() {
|
|
5209
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5210
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5211
|
-
* scopes: [
|
|
5212
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5213
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
5214
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
5215
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
5216
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
5217
|
-
* ],
|
|
5218
|
-
* });
|
|
5219
|
-
*
|
|
5220
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5221
|
-
* const authClient = await auth.getClient();
|
|
5222
|
-
* google.options({auth: authClient});
|
|
5223
|
-
*
|
|
5224
|
-
* // Do the magic
|
|
5225
|
-
* const res = await storage.notifications.get({
|
|
5226
|
-
* // The parent bucket of the notification.
|
|
5227
|
-
* bucket: 'placeholder-value',
|
|
5228
|
-
* // Notification ID
|
|
5229
|
-
* notification: 'placeholder-value',
|
|
5230
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
5231
|
-
* userProject: 'placeholder-value',
|
|
5232
|
-
* });
|
|
5233
|
-
* console.log(res.data);
|
|
5234
|
-
*
|
|
5235
|
-
* // Example response
|
|
5236
|
-
* // {
|
|
5237
|
-
* // "custom_attributes": {},
|
|
5238
|
-
* // "etag": "my_etag",
|
|
5239
|
-
* // "event_types": [],
|
|
5240
|
-
* // "id": "my_id",
|
|
5241
|
-
* // "kind": "my_kind",
|
|
5242
|
-
* // "object_name_prefix": "my_object_name_prefix",
|
|
5243
|
-
* // "payload_format": "my_payload_format",
|
|
5244
|
-
* // "selfLink": "my_selfLink",
|
|
5245
|
-
* // "topic": "my_topic"
|
|
5246
|
-
* // }
|
|
5247
|
-
* }
|
|
5248
|
-
*
|
|
5249
|
-
* main().catch(e => {
|
|
5250
|
-
* console.error(e);
|
|
5251
|
-
* throw e;
|
|
5252
|
-
* });
|
|
5253
|
-
*
|
|
5254
|
-
* ```
|
|
5255
3509
|
*
|
|
5256
3510
|
* @param params - Parameters for request
|
|
5257
3511
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5339,78 +3593,6 @@ export namespace storage_v1 {
|
|
|
5339
3593
|
|
|
5340
3594
|
/**
|
|
5341
3595
|
* Creates a notification subscription for a given bucket.
|
|
5342
|
-
* @example
|
|
5343
|
-
* ```js
|
|
5344
|
-
* // Before running the sample:
|
|
5345
|
-
* // - Enable the API at:
|
|
5346
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5347
|
-
* // - Login into gcloud by running:
|
|
5348
|
-
* // `$ gcloud auth application-default login`
|
|
5349
|
-
* // - Install the npm module by running:
|
|
5350
|
-
* // `$ npm install googleapis`
|
|
5351
|
-
*
|
|
5352
|
-
* const {google} = require('googleapis');
|
|
5353
|
-
* const storage = google.storage('v1');
|
|
5354
|
-
*
|
|
5355
|
-
* async function main() {
|
|
5356
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5357
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5358
|
-
* scopes: [
|
|
5359
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5360
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
5361
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
5362
|
-
* ],
|
|
5363
|
-
* });
|
|
5364
|
-
*
|
|
5365
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5366
|
-
* const authClient = await auth.getClient();
|
|
5367
|
-
* google.options({auth: authClient});
|
|
5368
|
-
*
|
|
5369
|
-
* // Do the magic
|
|
5370
|
-
* const res = await storage.notifications.insert({
|
|
5371
|
-
* // The parent bucket of the notification.
|
|
5372
|
-
* bucket: 'placeholder-value',
|
|
5373
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
5374
|
-
* userProject: 'placeholder-value',
|
|
5375
|
-
*
|
|
5376
|
-
* // Request body metadata
|
|
5377
|
-
* requestBody: {
|
|
5378
|
-
* // request body parameters
|
|
5379
|
-
* // {
|
|
5380
|
-
* // "custom_attributes": {},
|
|
5381
|
-
* // "etag": "my_etag",
|
|
5382
|
-
* // "event_types": [],
|
|
5383
|
-
* // "id": "my_id",
|
|
5384
|
-
* // "kind": "my_kind",
|
|
5385
|
-
* // "object_name_prefix": "my_object_name_prefix",
|
|
5386
|
-
* // "payload_format": "my_payload_format",
|
|
5387
|
-
* // "selfLink": "my_selfLink",
|
|
5388
|
-
* // "topic": "my_topic"
|
|
5389
|
-
* // }
|
|
5390
|
-
* },
|
|
5391
|
-
* });
|
|
5392
|
-
* console.log(res.data);
|
|
5393
|
-
*
|
|
5394
|
-
* // Example response
|
|
5395
|
-
* // {
|
|
5396
|
-
* // "custom_attributes": {},
|
|
5397
|
-
* // "etag": "my_etag",
|
|
5398
|
-
* // "event_types": [],
|
|
5399
|
-
* // "id": "my_id",
|
|
5400
|
-
* // "kind": "my_kind",
|
|
5401
|
-
* // "object_name_prefix": "my_object_name_prefix",
|
|
5402
|
-
* // "payload_format": "my_payload_format",
|
|
5403
|
-
* // "selfLink": "my_selfLink",
|
|
5404
|
-
* // "topic": "my_topic"
|
|
5405
|
-
* // }
|
|
5406
|
-
* }
|
|
5407
|
-
*
|
|
5408
|
-
* main().catch(e => {
|
|
5409
|
-
* console.error(e);
|
|
5410
|
-
* throw e;
|
|
5411
|
-
* });
|
|
5412
|
-
*
|
|
5413
|
-
* ```
|
|
5414
3596
|
*
|
|
5415
3597
|
* @param params - Parameters for request
|
|
5416
3598
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5497,57 +3679,6 @@ export namespace storage_v1 {
|
|
|
5497
3679
|
|
|
5498
3680
|
/**
|
|
5499
3681
|
* Retrieves a list of notification subscriptions for a given bucket.
|
|
5500
|
-
* @example
|
|
5501
|
-
* ```js
|
|
5502
|
-
* // Before running the sample:
|
|
5503
|
-
* // - Enable the API at:
|
|
5504
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5505
|
-
* // - Login into gcloud by running:
|
|
5506
|
-
* // `$ gcloud auth application-default login`
|
|
5507
|
-
* // - Install the npm module by running:
|
|
5508
|
-
* // `$ npm install googleapis`
|
|
5509
|
-
*
|
|
5510
|
-
* const {google} = require('googleapis');
|
|
5511
|
-
* const storage = google.storage('v1');
|
|
5512
|
-
*
|
|
5513
|
-
* async function main() {
|
|
5514
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5515
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5516
|
-
* scopes: [
|
|
5517
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5518
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
5519
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
5520
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
5521
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
5522
|
-
* ],
|
|
5523
|
-
* });
|
|
5524
|
-
*
|
|
5525
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5526
|
-
* const authClient = await auth.getClient();
|
|
5527
|
-
* google.options({auth: authClient});
|
|
5528
|
-
*
|
|
5529
|
-
* // Do the magic
|
|
5530
|
-
* const res = await storage.notifications.list({
|
|
5531
|
-
* // Name of a Google Cloud Storage bucket.
|
|
5532
|
-
* bucket: 'placeholder-value',
|
|
5533
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
5534
|
-
* userProject: 'placeholder-value',
|
|
5535
|
-
* });
|
|
5536
|
-
* console.log(res.data);
|
|
5537
|
-
*
|
|
5538
|
-
* // Example response
|
|
5539
|
-
* // {
|
|
5540
|
-
* // "items": [],
|
|
5541
|
-
* // "kind": "my_kind"
|
|
5542
|
-
* // }
|
|
5543
|
-
* }
|
|
5544
|
-
*
|
|
5545
|
-
* main().catch(e => {
|
|
5546
|
-
* console.error(e);
|
|
5547
|
-
* throw e;
|
|
5548
|
-
* });
|
|
5549
|
-
*
|
|
5550
|
-
* ```
|
|
5551
3682
|
*
|
|
5552
3683
|
* @param params - Parameters for request
|
|
5553
3684
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5699,54 +3830,6 @@ export namespace storage_v1 {
|
|
|
5699
3830
|
|
|
5700
3831
|
/**
|
|
5701
3832
|
* Permanently deletes the ACL entry for the specified entity on the specified object.
|
|
5702
|
-
* @example
|
|
5703
|
-
* ```js
|
|
5704
|
-
* // Before running the sample:
|
|
5705
|
-
* // - Enable the API at:
|
|
5706
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5707
|
-
* // - Login into gcloud by running:
|
|
5708
|
-
* // `$ gcloud auth application-default login`
|
|
5709
|
-
* // - Install the npm module by running:
|
|
5710
|
-
* // `$ npm install googleapis`
|
|
5711
|
-
*
|
|
5712
|
-
* const {google} = require('googleapis');
|
|
5713
|
-
* const storage = google.storage('v1');
|
|
5714
|
-
*
|
|
5715
|
-
* async function main() {
|
|
5716
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5717
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5718
|
-
* scopes: [
|
|
5719
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5720
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
5721
|
-
* ],
|
|
5722
|
-
* });
|
|
5723
|
-
*
|
|
5724
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5725
|
-
* const authClient = await auth.getClient();
|
|
5726
|
-
* google.options({auth: authClient});
|
|
5727
|
-
*
|
|
5728
|
-
* // Do the magic
|
|
5729
|
-
* const res = await storage.objectAccessControls.delete({
|
|
5730
|
-
* // Name of a bucket.
|
|
5731
|
-
* bucket: 'placeholder-value',
|
|
5732
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
5733
|
-
* entity: 'placeholder-value',
|
|
5734
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
5735
|
-
* generation: 'placeholder-value',
|
|
5736
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
5737
|
-
* object: 'placeholder-value',
|
|
5738
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
5739
|
-
* userProject: 'placeholder-value',
|
|
5740
|
-
* });
|
|
5741
|
-
* console.log(res.data);
|
|
5742
|
-
* }
|
|
5743
|
-
*
|
|
5744
|
-
* main().catch(e => {
|
|
5745
|
-
* console.error(e);
|
|
5746
|
-
* throw e;
|
|
5747
|
-
* });
|
|
5748
|
-
*
|
|
5749
|
-
* ```
|
|
5750
3833
|
*
|
|
5751
3834
|
* @param params - Parameters for request
|
|
5752
3835
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5831,71 +3914,6 @@ export namespace storage_v1 {
|
|
|
5831
3914
|
|
|
5832
3915
|
/**
|
|
5833
3916
|
* Returns the ACL entry for the specified entity on the specified object.
|
|
5834
|
-
* @example
|
|
5835
|
-
* ```js
|
|
5836
|
-
* // Before running the sample:
|
|
5837
|
-
* // - Enable the API at:
|
|
5838
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5839
|
-
* // - Login into gcloud by running:
|
|
5840
|
-
* // `$ gcloud auth application-default login`
|
|
5841
|
-
* // - Install the npm module by running:
|
|
5842
|
-
* // `$ npm install googleapis`
|
|
5843
|
-
*
|
|
5844
|
-
* const {google} = require('googleapis');
|
|
5845
|
-
* const storage = google.storage('v1');
|
|
5846
|
-
*
|
|
5847
|
-
* async function main() {
|
|
5848
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5849
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5850
|
-
* scopes: [
|
|
5851
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5852
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
5853
|
-
* ],
|
|
5854
|
-
* });
|
|
5855
|
-
*
|
|
5856
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5857
|
-
* const authClient = await auth.getClient();
|
|
5858
|
-
* google.options({auth: authClient});
|
|
5859
|
-
*
|
|
5860
|
-
* // Do the magic
|
|
5861
|
-
* const res = await storage.objectAccessControls.get({
|
|
5862
|
-
* // Name of a bucket.
|
|
5863
|
-
* bucket: 'placeholder-value',
|
|
5864
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
5865
|
-
* entity: 'placeholder-value',
|
|
5866
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
5867
|
-
* generation: 'placeholder-value',
|
|
5868
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
5869
|
-
* object: 'placeholder-value',
|
|
5870
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
5871
|
-
* userProject: 'placeholder-value',
|
|
5872
|
-
* });
|
|
5873
|
-
* console.log(res.data);
|
|
5874
|
-
*
|
|
5875
|
-
* // Example response
|
|
5876
|
-
* // {
|
|
5877
|
-
* // "bucket": "my_bucket",
|
|
5878
|
-
* // "domain": "my_domain",
|
|
5879
|
-
* // "email": "my_email",
|
|
5880
|
-
* // "entity": "my_entity",
|
|
5881
|
-
* // "entityId": "my_entityId",
|
|
5882
|
-
* // "etag": "my_etag",
|
|
5883
|
-
* // "generation": "my_generation",
|
|
5884
|
-
* // "id": "my_id",
|
|
5885
|
-
* // "kind": "my_kind",
|
|
5886
|
-
* // "object": "my_object",
|
|
5887
|
-
* // "projectTeam": {},
|
|
5888
|
-
* // "role": "my_role",
|
|
5889
|
-
* // "selfLink": "my_selfLink"
|
|
5890
|
-
* // }
|
|
5891
|
-
* }
|
|
5892
|
-
*
|
|
5893
|
-
* main().catch(e => {
|
|
5894
|
-
* console.error(e);
|
|
5895
|
-
* throw e;
|
|
5896
|
-
* });
|
|
5897
|
-
*
|
|
5898
|
-
* ```
|
|
5899
3917
|
*
|
|
5900
3918
|
* @param params - Parameters for request
|
|
5901
3919
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5985,89 +4003,6 @@ export namespace storage_v1 {
|
|
|
5985
4003
|
|
|
5986
4004
|
/**
|
|
5987
4005
|
* Creates a new ACL entry on the specified object.
|
|
5988
|
-
* @example
|
|
5989
|
-
* ```js
|
|
5990
|
-
* // Before running the sample:
|
|
5991
|
-
* // - Enable the API at:
|
|
5992
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
5993
|
-
* // - Login into gcloud by running:
|
|
5994
|
-
* // `$ gcloud auth application-default login`
|
|
5995
|
-
* // - Install the npm module by running:
|
|
5996
|
-
* // `$ npm install googleapis`
|
|
5997
|
-
*
|
|
5998
|
-
* const {google} = require('googleapis');
|
|
5999
|
-
* const storage = google.storage('v1');
|
|
6000
|
-
*
|
|
6001
|
-
* async function main() {
|
|
6002
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6003
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6004
|
-
* scopes: [
|
|
6005
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6006
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
6007
|
-
* ],
|
|
6008
|
-
* });
|
|
6009
|
-
*
|
|
6010
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6011
|
-
* const authClient = await auth.getClient();
|
|
6012
|
-
* google.options({auth: authClient});
|
|
6013
|
-
*
|
|
6014
|
-
* // Do the magic
|
|
6015
|
-
* const res = await storage.objectAccessControls.insert({
|
|
6016
|
-
* // Name of a bucket.
|
|
6017
|
-
* bucket: 'placeholder-value',
|
|
6018
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
6019
|
-
* generation: 'placeholder-value',
|
|
6020
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
6021
|
-
* object: 'placeholder-value',
|
|
6022
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
6023
|
-
* userProject: 'placeholder-value',
|
|
6024
|
-
*
|
|
6025
|
-
* // Request body metadata
|
|
6026
|
-
* requestBody: {
|
|
6027
|
-
* // request body parameters
|
|
6028
|
-
* // {
|
|
6029
|
-
* // "bucket": "my_bucket",
|
|
6030
|
-
* // "domain": "my_domain",
|
|
6031
|
-
* // "email": "my_email",
|
|
6032
|
-
* // "entity": "my_entity",
|
|
6033
|
-
* // "entityId": "my_entityId",
|
|
6034
|
-
* // "etag": "my_etag",
|
|
6035
|
-
* // "generation": "my_generation",
|
|
6036
|
-
* // "id": "my_id",
|
|
6037
|
-
* // "kind": "my_kind",
|
|
6038
|
-
* // "object": "my_object",
|
|
6039
|
-
* // "projectTeam": {},
|
|
6040
|
-
* // "role": "my_role",
|
|
6041
|
-
* // "selfLink": "my_selfLink"
|
|
6042
|
-
* // }
|
|
6043
|
-
* },
|
|
6044
|
-
* });
|
|
6045
|
-
* console.log(res.data);
|
|
6046
|
-
*
|
|
6047
|
-
* // Example response
|
|
6048
|
-
* // {
|
|
6049
|
-
* // "bucket": "my_bucket",
|
|
6050
|
-
* // "domain": "my_domain",
|
|
6051
|
-
* // "email": "my_email",
|
|
6052
|
-
* // "entity": "my_entity",
|
|
6053
|
-
* // "entityId": "my_entityId",
|
|
6054
|
-
* // "etag": "my_etag",
|
|
6055
|
-
* // "generation": "my_generation",
|
|
6056
|
-
* // "id": "my_id",
|
|
6057
|
-
* // "kind": "my_kind",
|
|
6058
|
-
* // "object": "my_object",
|
|
6059
|
-
* // "projectTeam": {},
|
|
6060
|
-
* // "role": "my_role",
|
|
6061
|
-
* // "selfLink": "my_selfLink"
|
|
6062
|
-
* // }
|
|
6063
|
-
* }
|
|
6064
|
-
*
|
|
6065
|
-
* main().catch(e => {
|
|
6066
|
-
* console.error(e);
|
|
6067
|
-
* throw e;
|
|
6068
|
-
* });
|
|
6069
|
-
*
|
|
6070
|
-
* ```
|
|
6071
4006
|
*
|
|
6072
4007
|
* @param params - Parameters for request
|
|
6073
4008
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6158,58 +4093,6 @@ export namespace storage_v1 {
|
|
|
6158
4093
|
|
|
6159
4094
|
/**
|
|
6160
4095
|
* Retrieves ACL entries on the specified object.
|
|
6161
|
-
* @example
|
|
6162
|
-
* ```js
|
|
6163
|
-
* // Before running the sample:
|
|
6164
|
-
* // - Enable the API at:
|
|
6165
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
6166
|
-
* // - Login into gcloud by running:
|
|
6167
|
-
* // `$ gcloud auth application-default login`
|
|
6168
|
-
* // - Install the npm module by running:
|
|
6169
|
-
* // `$ npm install googleapis`
|
|
6170
|
-
*
|
|
6171
|
-
* const {google} = require('googleapis');
|
|
6172
|
-
* const storage = google.storage('v1');
|
|
6173
|
-
*
|
|
6174
|
-
* async function main() {
|
|
6175
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6176
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6177
|
-
* scopes: [
|
|
6178
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6179
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
6180
|
-
* ],
|
|
6181
|
-
* });
|
|
6182
|
-
*
|
|
6183
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6184
|
-
* const authClient = await auth.getClient();
|
|
6185
|
-
* google.options({auth: authClient});
|
|
6186
|
-
*
|
|
6187
|
-
* // Do the magic
|
|
6188
|
-
* const res = await storage.objectAccessControls.list({
|
|
6189
|
-
* // Name of a bucket.
|
|
6190
|
-
* bucket: 'placeholder-value',
|
|
6191
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
6192
|
-
* generation: 'placeholder-value',
|
|
6193
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
6194
|
-
* object: 'placeholder-value',
|
|
6195
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
6196
|
-
* userProject: 'placeholder-value',
|
|
6197
|
-
* });
|
|
6198
|
-
* console.log(res.data);
|
|
6199
|
-
*
|
|
6200
|
-
* // Example response
|
|
6201
|
-
* // {
|
|
6202
|
-
* // "items": [],
|
|
6203
|
-
* // "kind": "my_kind"
|
|
6204
|
-
* // }
|
|
6205
|
-
* }
|
|
6206
|
-
*
|
|
6207
|
-
* main().catch(e => {
|
|
6208
|
-
* console.error(e);
|
|
6209
|
-
* throw e;
|
|
6210
|
-
* });
|
|
6211
|
-
*
|
|
6212
|
-
* ```
|
|
6213
4096
|
*
|
|
6214
4097
|
* @param params - Parameters for request
|
|
6215
4098
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6302,91 +4185,6 @@ export namespace storage_v1 {
|
|
|
6302
4185
|
|
|
6303
4186
|
/**
|
|
6304
4187
|
* Patches an ACL entry on the specified object.
|
|
6305
|
-
* @example
|
|
6306
|
-
* ```js
|
|
6307
|
-
* // Before running the sample:
|
|
6308
|
-
* // - Enable the API at:
|
|
6309
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
6310
|
-
* // - Login into gcloud by running:
|
|
6311
|
-
* // `$ gcloud auth application-default login`
|
|
6312
|
-
* // - Install the npm module by running:
|
|
6313
|
-
* // `$ npm install googleapis`
|
|
6314
|
-
*
|
|
6315
|
-
* const {google} = require('googleapis');
|
|
6316
|
-
* const storage = google.storage('v1');
|
|
6317
|
-
*
|
|
6318
|
-
* async function main() {
|
|
6319
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6320
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6321
|
-
* scopes: [
|
|
6322
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6323
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
6324
|
-
* ],
|
|
6325
|
-
* });
|
|
6326
|
-
*
|
|
6327
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6328
|
-
* const authClient = await auth.getClient();
|
|
6329
|
-
* google.options({auth: authClient});
|
|
6330
|
-
*
|
|
6331
|
-
* // Do the magic
|
|
6332
|
-
* const res = await storage.objectAccessControls.patch({
|
|
6333
|
-
* // Name of a bucket.
|
|
6334
|
-
* bucket: 'placeholder-value',
|
|
6335
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
6336
|
-
* entity: 'placeholder-value',
|
|
6337
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
6338
|
-
* generation: 'placeholder-value',
|
|
6339
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
6340
|
-
* object: 'placeholder-value',
|
|
6341
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
6342
|
-
* userProject: 'placeholder-value',
|
|
6343
|
-
*
|
|
6344
|
-
* // Request body metadata
|
|
6345
|
-
* requestBody: {
|
|
6346
|
-
* // request body parameters
|
|
6347
|
-
* // {
|
|
6348
|
-
* // "bucket": "my_bucket",
|
|
6349
|
-
* // "domain": "my_domain",
|
|
6350
|
-
* // "email": "my_email",
|
|
6351
|
-
* // "entity": "my_entity",
|
|
6352
|
-
* // "entityId": "my_entityId",
|
|
6353
|
-
* // "etag": "my_etag",
|
|
6354
|
-
* // "generation": "my_generation",
|
|
6355
|
-
* // "id": "my_id",
|
|
6356
|
-
* // "kind": "my_kind",
|
|
6357
|
-
* // "object": "my_object",
|
|
6358
|
-
* // "projectTeam": {},
|
|
6359
|
-
* // "role": "my_role",
|
|
6360
|
-
* // "selfLink": "my_selfLink"
|
|
6361
|
-
* // }
|
|
6362
|
-
* },
|
|
6363
|
-
* });
|
|
6364
|
-
* console.log(res.data);
|
|
6365
|
-
*
|
|
6366
|
-
* // Example response
|
|
6367
|
-
* // {
|
|
6368
|
-
* // "bucket": "my_bucket",
|
|
6369
|
-
* // "domain": "my_domain",
|
|
6370
|
-
* // "email": "my_email",
|
|
6371
|
-
* // "entity": "my_entity",
|
|
6372
|
-
* // "entityId": "my_entityId",
|
|
6373
|
-
* // "etag": "my_etag",
|
|
6374
|
-
* // "generation": "my_generation",
|
|
6375
|
-
* // "id": "my_id",
|
|
6376
|
-
* // "kind": "my_kind",
|
|
6377
|
-
* // "object": "my_object",
|
|
6378
|
-
* // "projectTeam": {},
|
|
6379
|
-
* // "role": "my_role",
|
|
6380
|
-
* // "selfLink": "my_selfLink"
|
|
6381
|
-
* // }
|
|
6382
|
-
* }
|
|
6383
|
-
*
|
|
6384
|
-
* main().catch(e => {
|
|
6385
|
-
* console.error(e);
|
|
6386
|
-
* throw e;
|
|
6387
|
-
* });
|
|
6388
|
-
*
|
|
6389
|
-
* ```
|
|
6390
4188
|
*
|
|
6391
4189
|
* @param params - Parameters for request
|
|
6392
4190
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6476,91 +4274,6 @@ export namespace storage_v1 {
|
|
|
6476
4274
|
|
|
6477
4275
|
/**
|
|
6478
4276
|
* Updates an ACL entry on the specified object.
|
|
6479
|
-
* @example
|
|
6480
|
-
* ```js
|
|
6481
|
-
* // Before running the sample:
|
|
6482
|
-
* // - Enable the API at:
|
|
6483
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
6484
|
-
* // - Login into gcloud by running:
|
|
6485
|
-
* // `$ gcloud auth application-default login`
|
|
6486
|
-
* // - Install the npm module by running:
|
|
6487
|
-
* // `$ npm install googleapis`
|
|
6488
|
-
*
|
|
6489
|
-
* const {google} = require('googleapis');
|
|
6490
|
-
* const storage = google.storage('v1');
|
|
6491
|
-
*
|
|
6492
|
-
* async function main() {
|
|
6493
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6494
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6495
|
-
* scopes: [
|
|
6496
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6497
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
6498
|
-
* ],
|
|
6499
|
-
* });
|
|
6500
|
-
*
|
|
6501
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6502
|
-
* const authClient = await auth.getClient();
|
|
6503
|
-
* google.options({auth: authClient});
|
|
6504
|
-
*
|
|
6505
|
-
* // Do the magic
|
|
6506
|
-
* const res = await storage.objectAccessControls.update({
|
|
6507
|
-
* // Name of a bucket.
|
|
6508
|
-
* bucket: 'placeholder-value',
|
|
6509
|
-
* // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
6510
|
-
* entity: 'placeholder-value',
|
|
6511
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
6512
|
-
* generation: 'placeholder-value',
|
|
6513
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
6514
|
-
* object: 'placeholder-value',
|
|
6515
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
6516
|
-
* userProject: 'placeholder-value',
|
|
6517
|
-
*
|
|
6518
|
-
* // Request body metadata
|
|
6519
|
-
* requestBody: {
|
|
6520
|
-
* // request body parameters
|
|
6521
|
-
* // {
|
|
6522
|
-
* // "bucket": "my_bucket",
|
|
6523
|
-
* // "domain": "my_domain",
|
|
6524
|
-
* // "email": "my_email",
|
|
6525
|
-
* // "entity": "my_entity",
|
|
6526
|
-
* // "entityId": "my_entityId",
|
|
6527
|
-
* // "etag": "my_etag",
|
|
6528
|
-
* // "generation": "my_generation",
|
|
6529
|
-
* // "id": "my_id",
|
|
6530
|
-
* // "kind": "my_kind",
|
|
6531
|
-
* // "object": "my_object",
|
|
6532
|
-
* // "projectTeam": {},
|
|
6533
|
-
* // "role": "my_role",
|
|
6534
|
-
* // "selfLink": "my_selfLink"
|
|
6535
|
-
* // }
|
|
6536
|
-
* },
|
|
6537
|
-
* });
|
|
6538
|
-
* console.log(res.data);
|
|
6539
|
-
*
|
|
6540
|
-
* // Example response
|
|
6541
|
-
* // {
|
|
6542
|
-
* // "bucket": "my_bucket",
|
|
6543
|
-
* // "domain": "my_domain",
|
|
6544
|
-
* // "email": "my_email",
|
|
6545
|
-
* // "entity": "my_entity",
|
|
6546
|
-
* // "entityId": "my_entityId",
|
|
6547
|
-
* // "etag": "my_etag",
|
|
6548
|
-
* // "generation": "my_generation",
|
|
6549
|
-
* // "id": "my_id",
|
|
6550
|
-
* // "kind": "my_kind",
|
|
6551
|
-
* // "object": "my_object",
|
|
6552
|
-
* // "projectTeam": {},
|
|
6553
|
-
* // "role": "my_role",
|
|
6554
|
-
* // "selfLink": "my_selfLink"
|
|
6555
|
-
* // }
|
|
6556
|
-
* }
|
|
6557
|
-
*
|
|
6558
|
-
* main().catch(e => {
|
|
6559
|
-
* console.error(e);
|
|
6560
|
-
* throw e;
|
|
6561
|
-
* });
|
|
6562
|
-
*
|
|
6563
|
-
* ```
|
|
6564
4277
|
*
|
|
6565
4278
|
* @param params - Parameters for request
|
|
6566
4279
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6803,105 +4516,6 @@ export namespace storage_v1 {
|
|
|
6803
4516
|
|
|
6804
4517
|
/**
|
|
6805
4518
|
* Concatenates a list of existing objects into a new object in the same bucket.
|
|
6806
|
-
* @example
|
|
6807
|
-
* ```js
|
|
6808
|
-
* // Before running the sample:
|
|
6809
|
-
* // - Enable the API at:
|
|
6810
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
6811
|
-
* // - Login into gcloud by running:
|
|
6812
|
-
* // `$ gcloud auth application-default login`
|
|
6813
|
-
* // - Install the npm module by running:
|
|
6814
|
-
* // `$ npm install googleapis`
|
|
6815
|
-
*
|
|
6816
|
-
* const {google} = require('googleapis');
|
|
6817
|
-
* const storage = google.storage('v1');
|
|
6818
|
-
*
|
|
6819
|
-
* async function main() {
|
|
6820
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6821
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6822
|
-
* scopes: [
|
|
6823
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6824
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
6825
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
6826
|
-
* ],
|
|
6827
|
-
* });
|
|
6828
|
-
*
|
|
6829
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6830
|
-
* const authClient = await auth.getClient();
|
|
6831
|
-
* google.options({auth: authClient});
|
|
6832
|
-
*
|
|
6833
|
-
* // Do the magic
|
|
6834
|
-
* const res = await storage.objects.compose({
|
|
6835
|
-
* // Name of the bucket containing the source objects. The destination object is stored in this bucket.
|
|
6836
|
-
* destinationBucket: 'placeholder-value',
|
|
6837
|
-
* // Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
6838
|
-
* destinationObject: 'placeholder-value',
|
|
6839
|
-
* // Apply a predefined set of access controls to the destination object.
|
|
6840
|
-
* destinationPredefinedAcl: 'placeholder-value',
|
|
6841
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
6842
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
6843
|
-
* // Makes the operation conditional on whether the object's current metageneration matches the given value.
|
|
6844
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
6845
|
-
* // Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.
|
|
6846
|
-
* kmsKeyName: 'placeholder-value',
|
|
6847
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
6848
|
-
* userProject: 'placeholder-value',
|
|
6849
|
-
*
|
|
6850
|
-
* // Request body metadata
|
|
6851
|
-
* requestBody: {
|
|
6852
|
-
* // request body parameters
|
|
6853
|
-
* // {
|
|
6854
|
-
* // "destination": {},
|
|
6855
|
-
* // "kind": "my_kind",
|
|
6856
|
-
* // "sourceObjects": []
|
|
6857
|
-
* // }
|
|
6858
|
-
* },
|
|
6859
|
-
* });
|
|
6860
|
-
* console.log(res.data);
|
|
6861
|
-
*
|
|
6862
|
-
* // Example response
|
|
6863
|
-
* // {
|
|
6864
|
-
* // "acl": [],
|
|
6865
|
-
* // "bucket": "my_bucket",
|
|
6866
|
-
* // "cacheControl": "my_cacheControl",
|
|
6867
|
-
* // "componentCount": 0,
|
|
6868
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
6869
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
6870
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
6871
|
-
* // "contentType": "my_contentType",
|
|
6872
|
-
* // "crc32c": "my_crc32c",
|
|
6873
|
-
* // "customTime": "my_customTime",
|
|
6874
|
-
* // "customerEncryption": {},
|
|
6875
|
-
* // "etag": "my_etag",
|
|
6876
|
-
* // "eventBasedHold": false,
|
|
6877
|
-
* // "generation": "my_generation",
|
|
6878
|
-
* // "id": "my_id",
|
|
6879
|
-
* // "kind": "my_kind",
|
|
6880
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
6881
|
-
* // "md5Hash": "my_md5Hash",
|
|
6882
|
-
* // "mediaLink": "my_mediaLink",
|
|
6883
|
-
* // "metadata": {},
|
|
6884
|
-
* // "metageneration": "my_metageneration",
|
|
6885
|
-
* // "name": "my_name",
|
|
6886
|
-
* // "owner": {},
|
|
6887
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
6888
|
-
* // "selfLink": "my_selfLink",
|
|
6889
|
-
* // "size": "my_size",
|
|
6890
|
-
* // "storageClass": "my_storageClass",
|
|
6891
|
-
* // "temporaryHold": false,
|
|
6892
|
-
* // "timeCreated": "my_timeCreated",
|
|
6893
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
6894
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
6895
|
-
* // "updated": "my_updated"
|
|
6896
|
-
* // }
|
|
6897
|
-
* }
|
|
6898
|
-
*
|
|
6899
|
-
* main().catch(e => {
|
|
6900
|
-
* console.error(e);
|
|
6901
|
-
* throw e;
|
|
6902
|
-
* });
|
|
6903
|
-
*
|
|
6904
|
-
* ```
|
|
6905
4519
|
*
|
|
6906
4520
|
* @param params - Parameters for request
|
|
6907
4521
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6988,154 +4602,6 @@ export namespace storage_v1 {
|
|
|
6988
4602
|
|
|
6989
4603
|
/**
|
|
6990
4604
|
* Copies a source object to a destination object. Optionally overrides metadata.
|
|
6991
|
-
* @example
|
|
6992
|
-
* ```js
|
|
6993
|
-
* // Before running the sample:
|
|
6994
|
-
* // - Enable the API at:
|
|
6995
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
6996
|
-
* // - Login into gcloud by running:
|
|
6997
|
-
* // `$ gcloud auth application-default login`
|
|
6998
|
-
* // - Install the npm module by running:
|
|
6999
|
-
* // `$ npm install googleapis`
|
|
7000
|
-
*
|
|
7001
|
-
* const {google} = require('googleapis');
|
|
7002
|
-
* const storage = google.storage('v1');
|
|
7003
|
-
*
|
|
7004
|
-
* async function main() {
|
|
7005
|
-
* const auth = new google.auth.GoogleAuth({
|
|
7006
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7007
|
-
* scopes: [
|
|
7008
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7009
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
7010
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
7011
|
-
* ],
|
|
7012
|
-
* });
|
|
7013
|
-
*
|
|
7014
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
7015
|
-
* const authClient = await auth.getClient();
|
|
7016
|
-
* google.options({auth: authClient});
|
|
7017
|
-
*
|
|
7018
|
-
* // Do the magic
|
|
7019
|
-
* const res = await storage.objects.copy({
|
|
7020
|
-
* // Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
7021
|
-
* destinationBucket: 'placeholder-value',
|
|
7022
|
-
* // Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.
|
|
7023
|
-
* destinationKmsKeyName: 'placeholder-value',
|
|
7024
|
-
* // Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.
|
|
7025
|
-
* destinationObject: 'placeholder-value',
|
|
7026
|
-
* // Apply a predefined set of access controls to the destination object.
|
|
7027
|
-
* destinationPredefinedAcl: 'placeholder-value',
|
|
7028
|
-
* // Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
7029
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
7030
|
-
* // Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
7031
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
7032
|
-
* // Makes the operation conditional on whether the destination object's current metageneration matches the given value.
|
|
7033
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
7034
|
-
* // Makes the operation conditional on whether the destination object's current metageneration does not match the given value.
|
|
7035
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
7036
|
-
* // Makes the operation conditional on whether the source object's current generation matches the given value.
|
|
7037
|
-
* ifSourceGenerationMatch: 'placeholder-value',
|
|
7038
|
-
* // Makes the operation conditional on whether the source object's current generation does not match the given value.
|
|
7039
|
-
* ifSourceGenerationNotMatch: 'placeholder-value',
|
|
7040
|
-
* // Makes the operation conditional on whether the source object's current metageneration matches the given value.
|
|
7041
|
-
* ifSourceMetagenerationMatch: 'placeholder-value',
|
|
7042
|
-
* // Makes the operation conditional on whether the source object's current metageneration does not match the given value.
|
|
7043
|
-
* ifSourceMetagenerationNotMatch: 'placeholder-value',
|
|
7044
|
-
* // Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
|
|
7045
|
-
* projection: 'placeholder-value',
|
|
7046
|
-
* // Name of the bucket in which to find the source object.
|
|
7047
|
-
* sourceBucket: 'placeholder-value',
|
|
7048
|
-
* // If present, selects a specific revision of the source object (as opposed to the latest version, the default).
|
|
7049
|
-
* sourceGeneration: 'placeholder-value',
|
|
7050
|
-
* // Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
7051
|
-
* sourceObject: 'placeholder-value',
|
|
7052
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
7053
|
-
* userProject: 'placeholder-value',
|
|
7054
|
-
*
|
|
7055
|
-
* // Request body metadata
|
|
7056
|
-
* requestBody: {
|
|
7057
|
-
* // request body parameters
|
|
7058
|
-
* // {
|
|
7059
|
-
* // "acl": [],
|
|
7060
|
-
* // "bucket": "my_bucket",
|
|
7061
|
-
* // "cacheControl": "my_cacheControl",
|
|
7062
|
-
* // "componentCount": 0,
|
|
7063
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
7064
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
7065
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
7066
|
-
* // "contentType": "my_contentType",
|
|
7067
|
-
* // "crc32c": "my_crc32c",
|
|
7068
|
-
* // "customTime": "my_customTime",
|
|
7069
|
-
* // "customerEncryption": {},
|
|
7070
|
-
* // "etag": "my_etag",
|
|
7071
|
-
* // "eventBasedHold": false,
|
|
7072
|
-
* // "generation": "my_generation",
|
|
7073
|
-
* // "id": "my_id",
|
|
7074
|
-
* // "kind": "my_kind",
|
|
7075
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
7076
|
-
* // "md5Hash": "my_md5Hash",
|
|
7077
|
-
* // "mediaLink": "my_mediaLink",
|
|
7078
|
-
* // "metadata": {},
|
|
7079
|
-
* // "metageneration": "my_metageneration",
|
|
7080
|
-
* // "name": "my_name",
|
|
7081
|
-
* // "owner": {},
|
|
7082
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
7083
|
-
* // "selfLink": "my_selfLink",
|
|
7084
|
-
* // "size": "my_size",
|
|
7085
|
-
* // "storageClass": "my_storageClass",
|
|
7086
|
-
* // "temporaryHold": false,
|
|
7087
|
-
* // "timeCreated": "my_timeCreated",
|
|
7088
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
7089
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
7090
|
-
* // "updated": "my_updated"
|
|
7091
|
-
* // }
|
|
7092
|
-
* },
|
|
7093
|
-
* });
|
|
7094
|
-
* console.log(res.data);
|
|
7095
|
-
*
|
|
7096
|
-
* // Example response
|
|
7097
|
-
* // {
|
|
7098
|
-
* // "acl": [],
|
|
7099
|
-
* // "bucket": "my_bucket",
|
|
7100
|
-
* // "cacheControl": "my_cacheControl",
|
|
7101
|
-
* // "componentCount": 0,
|
|
7102
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
7103
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
7104
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
7105
|
-
* // "contentType": "my_contentType",
|
|
7106
|
-
* // "crc32c": "my_crc32c",
|
|
7107
|
-
* // "customTime": "my_customTime",
|
|
7108
|
-
* // "customerEncryption": {},
|
|
7109
|
-
* // "etag": "my_etag",
|
|
7110
|
-
* // "eventBasedHold": false,
|
|
7111
|
-
* // "generation": "my_generation",
|
|
7112
|
-
* // "id": "my_id",
|
|
7113
|
-
* // "kind": "my_kind",
|
|
7114
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
7115
|
-
* // "md5Hash": "my_md5Hash",
|
|
7116
|
-
* // "mediaLink": "my_mediaLink",
|
|
7117
|
-
* // "metadata": {},
|
|
7118
|
-
* // "metageneration": "my_metageneration",
|
|
7119
|
-
* // "name": "my_name",
|
|
7120
|
-
* // "owner": {},
|
|
7121
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
7122
|
-
* // "selfLink": "my_selfLink",
|
|
7123
|
-
* // "size": "my_size",
|
|
7124
|
-
* // "storageClass": "my_storageClass",
|
|
7125
|
-
* // "temporaryHold": false,
|
|
7126
|
-
* // "timeCreated": "my_timeCreated",
|
|
7127
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
7128
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
7129
|
-
* // "updated": "my_updated"
|
|
7130
|
-
* // }
|
|
7131
|
-
* }
|
|
7132
|
-
*
|
|
7133
|
-
* main().catch(e => {
|
|
7134
|
-
* console.error(e);
|
|
7135
|
-
* throw e;
|
|
7136
|
-
* });
|
|
7137
|
-
*
|
|
7138
|
-
* ```
|
|
7139
4605
|
*
|
|
7140
4606
|
* @param params - Parameters for request
|
|
7141
4607
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7232,61 +4698,6 @@ export namespace storage_v1 {
|
|
|
7232
4698
|
|
|
7233
4699
|
/**
|
|
7234
4700
|
* Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.
|
|
7235
|
-
* @example
|
|
7236
|
-
* ```js
|
|
7237
|
-
* // Before running the sample:
|
|
7238
|
-
* // - Enable the API at:
|
|
7239
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
7240
|
-
* // - Login into gcloud by running:
|
|
7241
|
-
* // `$ gcloud auth application-default login`
|
|
7242
|
-
* // - Install the npm module by running:
|
|
7243
|
-
* // `$ npm install googleapis`
|
|
7244
|
-
*
|
|
7245
|
-
* const {google} = require('googleapis');
|
|
7246
|
-
* const storage = google.storage('v1');
|
|
7247
|
-
*
|
|
7248
|
-
* async function main() {
|
|
7249
|
-
* const auth = new google.auth.GoogleAuth({
|
|
7250
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7251
|
-
* scopes: [
|
|
7252
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7253
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
7254
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
7255
|
-
* ],
|
|
7256
|
-
* });
|
|
7257
|
-
*
|
|
7258
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
7259
|
-
* const authClient = await auth.getClient();
|
|
7260
|
-
* google.options({auth: authClient});
|
|
7261
|
-
*
|
|
7262
|
-
* // Do the magic
|
|
7263
|
-
* const res = await storage.objects.delete({
|
|
7264
|
-
* // Name of the bucket in which the object resides.
|
|
7265
|
-
* bucket: 'placeholder-value',
|
|
7266
|
-
* // If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).
|
|
7267
|
-
* generation: 'placeholder-value',
|
|
7268
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
7269
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
7270
|
-
* // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
7271
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
7272
|
-
* // Makes the operation conditional on whether the object's current metageneration matches the given value.
|
|
7273
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
7274
|
-
* // Makes the operation conditional on whether the object's current metageneration does not match the given value.
|
|
7275
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
7276
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
7277
|
-
* object: 'placeholder-value',
|
|
7278
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
7279
|
-
* userProject: 'placeholder-value',
|
|
7280
|
-
* });
|
|
7281
|
-
* console.log(res.data);
|
|
7282
|
-
* }
|
|
7283
|
-
*
|
|
7284
|
-
* main().catch(e => {
|
|
7285
|
-
* console.error(e);
|
|
7286
|
-
* throw e;
|
|
7287
|
-
* });
|
|
7288
|
-
*
|
|
7289
|
-
* ```
|
|
7290
4701
|
*
|
|
7291
4702
|
* @param params - Parameters for request
|
|
7292
4703
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7371,101 +4782,6 @@ export namespace storage_v1 {
|
|
|
7371
4782
|
|
|
7372
4783
|
/**
|
|
7373
4784
|
* Retrieves an object or its metadata.
|
|
7374
|
-
* @example
|
|
7375
|
-
* ```js
|
|
7376
|
-
* // Before running the sample:
|
|
7377
|
-
* // - Enable the API at:
|
|
7378
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
7379
|
-
* // - Login into gcloud by running:
|
|
7380
|
-
* // `$ gcloud auth application-default login`
|
|
7381
|
-
* // - Install the npm module by running:
|
|
7382
|
-
* // `$ npm install googleapis`
|
|
7383
|
-
*
|
|
7384
|
-
* const {google} = require('googleapis');
|
|
7385
|
-
* const storage = google.storage('v1');
|
|
7386
|
-
*
|
|
7387
|
-
* async function main() {
|
|
7388
|
-
* const auth = new google.auth.GoogleAuth({
|
|
7389
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7390
|
-
* scopes: [
|
|
7391
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7392
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
7393
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
7394
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
7395
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
7396
|
-
* ],
|
|
7397
|
-
* });
|
|
7398
|
-
*
|
|
7399
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
7400
|
-
* const authClient = await auth.getClient();
|
|
7401
|
-
* google.options({auth: authClient});
|
|
7402
|
-
*
|
|
7403
|
-
* // Do the magic
|
|
7404
|
-
* const res = await storage.objects.get({
|
|
7405
|
-
* // Name of the bucket in which the object resides.
|
|
7406
|
-
* bucket: 'placeholder-value',
|
|
7407
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
7408
|
-
* generation: 'placeholder-value',
|
|
7409
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
7410
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
7411
|
-
* // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
7412
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
7413
|
-
* // Makes the operation conditional on whether the object's current metageneration matches the given value.
|
|
7414
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
7415
|
-
* // Makes the operation conditional on whether the object's current metageneration does not match the given value.
|
|
7416
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
7417
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
7418
|
-
* object: 'placeholder-value',
|
|
7419
|
-
* // Set of properties to return. Defaults to noAcl.
|
|
7420
|
-
* projection: 'placeholder-value',
|
|
7421
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
7422
|
-
* userProject: 'placeholder-value',
|
|
7423
|
-
* });
|
|
7424
|
-
* console.log(res.data);
|
|
7425
|
-
*
|
|
7426
|
-
* // Example response
|
|
7427
|
-
* // {
|
|
7428
|
-
* // "acl": [],
|
|
7429
|
-
* // "bucket": "my_bucket",
|
|
7430
|
-
* // "cacheControl": "my_cacheControl",
|
|
7431
|
-
* // "componentCount": 0,
|
|
7432
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
7433
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
7434
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
7435
|
-
* // "contentType": "my_contentType",
|
|
7436
|
-
* // "crc32c": "my_crc32c",
|
|
7437
|
-
* // "customTime": "my_customTime",
|
|
7438
|
-
* // "customerEncryption": {},
|
|
7439
|
-
* // "etag": "my_etag",
|
|
7440
|
-
* // "eventBasedHold": false,
|
|
7441
|
-
* // "generation": "my_generation",
|
|
7442
|
-
* // "id": "my_id",
|
|
7443
|
-
* // "kind": "my_kind",
|
|
7444
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
7445
|
-
* // "md5Hash": "my_md5Hash",
|
|
7446
|
-
* // "mediaLink": "my_mediaLink",
|
|
7447
|
-
* // "metadata": {},
|
|
7448
|
-
* // "metageneration": "my_metageneration",
|
|
7449
|
-
* // "name": "my_name",
|
|
7450
|
-
* // "owner": {},
|
|
7451
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
7452
|
-
* // "selfLink": "my_selfLink",
|
|
7453
|
-
* // "size": "my_size",
|
|
7454
|
-
* // "storageClass": "my_storageClass",
|
|
7455
|
-
* // "temporaryHold": false,
|
|
7456
|
-
* // "timeCreated": "my_timeCreated",
|
|
7457
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
7458
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
7459
|
-
* // "updated": "my_updated"
|
|
7460
|
-
* // }
|
|
7461
|
-
* }
|
|
7462
|
-
*
|
|
7463
|
-
* main().catch(e => {
|
|
7464
|
-
* console.error(e);
|
|
7465
|
-
* throw e;
|
|
7466
|
-
* });
|
|
7467
|
-
*
|
|
7468
|
-
* ```
|
|
7469
4785
|
*
|
|
7470
4786
|
* @param params - Parameters for request
|
|
7471
4787
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7552,64 +4868,6 @@ export namespace storage_v1 {
|
|
|
7552
4868
|
|
|
7553
4869
|
/**
|
|
7554
4870
|
* Returns an IAM policy for the specified object.
|
|
7555
|
-
* @example
|
|
7556
|
-
* ```js
|
|
7557
|
-
* // Before running the sample:
|
|
7558
|
-
* // - Enable the API at:
|
|
7559
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
7560
|
-
* // - Login into gcloud by running:
|
|
7561
|
-
* // `$ gcloud auth application-default login`
|
|
7562
|
-
* // - Install the npm module by running:
|
|
7563
|
-
* // `$ npm install googleapis`
|
|
7564
|
-
*
|
|
7565
|
-
* const {google} = require('googleapis');
|
|
7566
|
-
* const storage = google.storage('v1');
|
|
7567
|
-
*
|
|
7568
|
-
* async function main() {
|
|
7569
|
-
* const auth = new google.auth.GoogleAuth({
|
|
7570
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7571
|
-
* scopes: [
|
|
7572
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7573
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
7574
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
7575
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
7576
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
7577
|
-
* ],
|
|
7578
|
-
* });
|
|
7579
|
-
*
|
|
7580
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
7581
|
-
* const authClient = await auth.getClient();
|
|
7582
|
-
* google.options({auth: authClient});
|
|
7583
|
-
*
|
|
7584
|
-
* // Do the magic
|
|
7585
|
-
* const res = await storage.objects.getIamPolicy({
|
|
7586
|
-
* // Name of the bucket in which the object resides.
|
|
7587
|
-
* bucket: 'placeholder-value',
|
|
7588
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
7589
|
-
* generation: 'placeholder-value',
|
|
7590
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
7591
|
-
* object: 'placeholder-value',
|
|
7592
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
7593
|
-
* userProject: 'placeholder-value',
|
|
7594
|
-
* });
|
|
7595
|
-
* console.log(res.data);
|
|
7596
|
-
*
|
|
7597
|
-
* // Example response
|
|
7598
|
-
* // {
|
|
7599
|
-
* // "bindings": [],
|
|
7600
|
-
* // "etag": "my_etag",
|
|
7601
|
-
* // "kind": "my_kind",
|
|
7602
|
-
* // "resourceId": "my_resourceId",
|
|
7603
|
-
* // "version": 0
|
|
7604
|
-
* // }
|
|
7605
|
-
* }
|
|
7606
|
-
*
|
|
7607
|
-
* main().catch(e => {
|
|
7608
|
-
* console.error(e);
|
|
7609
|
-
* throw e;
|
|
7610
|
-
* });
|
|
7611
|
-
*
|
|
7612
|
-
* ```
|
|
7613
4871
|
*
|
|
7614
4872
|
* @param params - Parameters for request
|
|
7615
4873
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7697,146 +4955,6 @@ export namespace storage_v1 {
|
|
|
7697
4955
|
|
|
7698
4956
|
/**
|
|
7699
4957
|
* Stores a new object and metadata.
|
|
7700
|
-
* @example
|
|
7701
|
-
* ```js
|
|
7702
|
-
* // Before running the sample:
|
|
7703
|
-
* // - Enable the API at:
|
|
7704
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
7705
|
-
* // - Login into gcloud by running:
|
|
7706
|
-
* // `$ gcloud auth application-default login`
|
|
7707
|
-
* // - Install the npm module by running:
|
|
7708
|
-
* // `$ npm install googleapis`
|
|
7709
|
-
*
|
|
7710
|
-
* const {google} = require('googleapis');
|
|
7711
|
-
* const storage = google.storage('v1');
|
|
7712
|
-
*
|
|
7713
|
-
* async function main() {
|
|
7714
|
-
* const auth = new google.auth.GoogleAuth({
|
|
7715
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7716
|
-
* scopes: [
|
|
7717
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7718
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
7719
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
7720
|
-
* ],
|
|
7721
|
-
* });
|
|
7722
|
-
*
|
|
7723
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
7724
|
-
* const authClient = await auth.getClient();
|
|
7725
|
-
* google.options({auth: authClient});
|
|
7726
|
-
*
|
|
7727
|
-
* // Do the magic
|
|
7728
|
-
* const res = await storage.objects.insert({
|
|
7729
|
-
* // Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
|
|
7730
|
-
* bucket: 'placeholder-value',
|
|
7731
|
-
* // If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.
|
|
7732
|
-
* contentEncoding: 'placeholder-value',
|
|
7733
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
7734
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
7735
|
-
* // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
7736
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
7737
|
-
* // Makes the operation conditional on whether the object's current metageneration matches the given value.
|
|
7738
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
7739
|
-
* // Makes the operation conditional on whether the object's current metageneration does not match the given value.
|
|
7740
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
7741
|
-
* // Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.
|
|
7742
|
-
* kmsKeyName: 'placeholder-value',
|
|
7743
|
-
* // Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
7744
|
-
* name: 'placeholder-value',
|
|
7745
|
-
* // Apply a predefined set of access controls to this object.
|
|
7746
|
-
* predefinedAcl: 'placeholder-value',
|
|
7747
|
-
* // Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
|
|
7748
|
-
* projection: 'placeholder-value',
|
|
7749
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
7750
|
-
* userProject: 'placeholder-value',
|
|
7751
|
-
*
|
|
7752
|
-
* // Request body metadata
|
|
7753
|
-
* requestBody: {
|
|
7754
|
-
* // request body parameters
|
|
7755
|
-
* // {
|
|
7756
|
-
* // "acl": [],
|
|
7757
|
-
* // "bucket": "my_bucket",
|
|
7758
|
-
* // "cacheControl": "my_cacheControl",
|
|
7759
|
-
* // "componentCount": 0,
|
|
7760
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
7761
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
7762
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
7763
|
-
* // "contentType": "my_contentType",
|
|
7764
|
-
* // "crc32c": "my_crc32c",
|
|
7765
|
-
* // "customTime": "my_customTime",
|
|
7766
|
-
* // "customerEncryption": {},
|
|
7767
|
-
* // "etag": "my_etag",
|
|
7768
|
-
* // "eventBasedHold": false,
|
|
7769
|
-
* // "generation": "my_generation",
|
|
7770
|
-
* // "id": "my_id",
|
|
7771
|
-
* // "kind": "my_kind",
|
|
7772
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
7773
|
-
* // "md5Hash": "my_md5Hash",
|
|
7774
|
-
* // "mediaLink": "my_mediaLink",
|
|
7775
|
-
* // "metadata": {},
|
|
7776
|
-
* // "metageneration": "my_metageneration",
|
|
7777
|
-
* // "name": "my_name",
|
|
7778
|
-
* // "owner": {},
|
|
7779
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
7780
|
-
* // "selfLink": "my_selfLink",
|
|
7781
|
-
* // "size": "my_size",
|
|
7782
|
-
* // "storageClass": "my_storageClass",
|
|
7783
|
-
* // "temporaryHold": false,
|
|
7784
|
-
* // "timeCreated": "my_timeCreated",
|
|
7785
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
7786
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
7787
|
-
* // "updated": "my_updated"
|
|
7788
|
-
* // }
|
|
7789
|
-
* },
|
|
7790
|
-
* media: {
|
|
7791
|
-
* mimeType: 'placeholder-value',
|
|
7792
|
-
* body: 'placeholder-value',
|
|
7793
|
-
* },
|
|
7794
|
-
* });
|
|
7795
|
-
* console.log(res.data);
|
|
7796
|
-
*
|
|
7797
|
-
* // Example response
|
|
7798
|
-
* // {
|
|
7799
|
-
* // "acl": [],
|
|
7800
|
-
* // "bucket": "my_bucket",
|
|
7801
|
-
* // "cacheControl": "my_cacheControl",
|
|
7802
|
-
* // "componentCount": 0,
|
|
7803
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
7804
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
7805
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
7806
|
-
* // "contentType": "my_contentType",
|
|
7807
|
-
* // "crc32c": "my_crc32c",
|
|
7808
|
-
* // "customTime": "my_customTime",
|
|
7809
|
-
* // "customerEncryption": {},
|
|
7810
|
-
* // "etag": "my_etag",
|
|
7811
|
-
* // "eventBasedHold": false,
|
|
7812
|
-
* // "generation": "my_generation",
|
|
7813
|
-
* // "id": "my_id",
|
|
7814
|
-
* // "kind": "my_kind",
|
|
7815
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
7816
|
-
* // "md5Hash": "my_md5Hash",
|
|
7817
|
-
* // "mediaLink": "my_mediaLink",
|
|
7818
|
-
* // "metadata": {},
|
|
7819
|
-
* // "metageneration": "my_metageneration",
|
|
7820
|
-
* // "name": "my_name",
|
|
7821
|
-
* // "owner": {},
|
|
7822
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
7823
|
-
* // "selfLink": "my_selfLink",
|
|
7824
|
-
* // "size": "my_size",
|
|
7825
|
-
* // "storageClass": "my_storageClass",
|
|
7826
|
-
* // "temporaryHold": false,
|
|
7827
|
-
* // "timeCreated": "my_timeCreated",
|
|
7828
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
7829
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
7830
|
-
* // "updated": "my_updated"
|
|
7831
|
-
* // }
|
|
7832
|
-
* }
|
|
7833
|
-
*
|
|
7834
|
-
* main().catch(e => {
|
|
7835
|
-
* console.error(e);
|
|
7836
|
-
* throw e;
|
|
7837
|
-
* });
|
|
7838
|
-
*
|
|
7839
|
-
* ```
|
|
7840
4958
|
*
|
|
7841
4959
|
* @param params - Parameters for request
|
|
7842
4960
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7927,79 +5045,6 @@ export namespace storage_v1 {
|
|
|
7927
5045
|
|
|
7928
5046
|
/**
|
|
7929
5047
|
* Retrieves a list of objects matching the criteria.
|
|
7930
|
-
* @example
|
|
7931
|
-
* ```js
|
|
7932
|
-
* // Before running the sample:
|
|
7933
|
-
* // - Enable the API at:
|
|
7934
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
7935
|
-
* // - Login into gcloud by running:
|
|
7936
|
-
* // `$ gcloud auth application-default login`
|
|
7937
|
-
* // - Install the npm module by running:
|
|
7938
|
-
* // `$ npm install googleapis`
|
|
7939
|
-
*
|
|
7940
|
-
* const {google} = require('googleapis');
|
|
7941
|
-
* const storage = google.storage('v1');
|
|
7942
|
-
*
|
|
7943
|
-
* async function main() {
|
|
7944
|
-
* const auth = new google.auth.GoogleAuth({
|
|
7945
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7946
|
-
* scopes: [
|
|
7947
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7948
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
7949
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
7950
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
7951
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
7952
|
-
* ],
|
|
7953
|
-
* });
|
|
7954
|
-
*
|
|
7955
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
7956
|
-
* const authClient = await auth.getClient();
|
|
7957
|
-
* google.options({auth: authClient});
|
|
7958
|
-
*
|
|
7959
|
-
* // Do the magic
|
|
7960
|
-
* const res = await storage.objects.list({
|
|
7961
|
-
* // Name of the bucket in which to look for objects.
|
|
7962
|
-
* bucket: 'placeholder-value',
|
|
7963
|
-
* // Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.
|
|
7964
|
-
* delimiter: 'placeholder-value',
|
|
7965
|
-
* // Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
|
|
7966
|
-
* endOffset: 'placeholder-value',
|
|
7967
|
-
* // If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.
|
|
7968
|
-
* includeTrailingDelimiter: 'placeholder-value',
|
|
7969
|
-
* // Filter results to objects and prefixes that match this glob pattern.
|
|
7970
|
-
* matchGlob: 'placeholder-value',
|
|
7971
|
-
* // Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.
|
|
7972
|
-
* maxResults: 'placeholder-value',
|
|
7973
|
-
* // A previously-returned page token representing part of the larger set of results to view.
|
|
7974
|
-
* pageToken: 'placeholder-value',
|
|
7975
|
-
* // Filter results to objects whose names begin with this prefix.
|
|
7976
|
-
* prefix: 'placeholder-value',
|
|
7977
|
-
* // Set of properties to return. Defaults to noAcl.
|
|
7978
|
-
* projection: 'placeholder-value',
|
|
7979
|
-
* // Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
|
|
7980
|
-
* startOffset: 'placeholder-value',
|
|
7981
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
7982
|
-
* userProject: 'placeholder-value',
|
|
7983
|
-
* // If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.
|
|
7984
|
-
* versions: 'placeholder-value',
|
|
7985
|
-
* });
|
|
7986
|
-
* console.log(res.data);
|
|
7987
|
-
*
|
|
7988
|
-
* // Example response
|
|
7989
|
-
* // {
|
|
7990
|
-
* // "items": [],
|
|
7991
|
-
* // "kind": "my_kind",
|
|
7992
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
7993
|
-
* // "prefixes": []
|
|
7994
|
-
* // }
|
|
7995
|
-
* }
|
|
7996
|
-
*
|
|
7997
|
-
* main().catch(e => {
|
|
7998
|
-
* console.error(e);
|
|
7999
|
-
* throw e;
|
|
8000
|
-
* });
|
|
8001
|
-
*
|
|
8002
|
-
* ```
|
|
8003
5048
|
*
|
|
8004
5049
|
* @param params - Parameters for request
|
|
8005
5050
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8086,139 +5131,6 @@ export namespace storage_v1 {
|
|
|
8086
5131
|
|
|
8087
5132
|
/**
|
|
8088
5133
|
* Patches an object's metadata.
|
|
8089
|
-
* @example
|
|
8090
|
-
* ```js
|
|
8091
|
-
* // Before running the sample:
|
|
8092
|
-
* // - Enable the API at:
|
|
8093
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
8094
|
-
* // - Login into gcloud by running:
|
|
8095
|
-
* // `$ gcloud auth application-default login`
|
|
8096
|
-
* // - Install the npm module by running:
|
|
8097
|
-
* // `$ npm install googleapis`
|
|
8098
|
-
*
|
|
8099
|
-
* const {google} = require('googleapis');
|
|
8100
|
-
* const storage = google.storage('v1');
|
|
8101
|
-
*
|
|
8102
|
-
* async function main() {
|
|
8103
|
-
* const auth = new google.auth.GoogleAuth({
|
|
8104
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8105
|
-
* scopes: [
|
|
8106
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8107
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
8108
|
-
* ],
|
|
8109
|
-
* });
|
|
8110
|
-
*
|
|
8111
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
8112
|
-
* const authClient = await auth.getClient();
|
|
8113
|
-
* google.options({auth: authClient});
|
|
8114
|
-
*
|
|
8115
|
-
* // Do the magic
|
|
8116
|
-
* const res = await storage.objects.patch({
|
|
8117
|
-
* // Name of the bucket in which the object resides.
|
|
8118
|
-
* bucket: 'placeholder-value',
|
|
8119
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
8120
|
-
* generation: 'placeholder-value',
|
|
8121
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
8122
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
8123
|
-
* // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
8124
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
8125
|
-
* // Makes the operation conditional on whether the object's current metageneration matches the given value.
|
|
8126
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
8127
|
-
* // Makes the operation conditional on whether the object's current metageneration does not match the given value.
|
|
8128
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
8129
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
8130
|
-
* object: 'placeholder-value',
|
|
8131
|
-
* // Apply a predefined set of access controls to this object.
|
|
8132
|
-
* predefinedAcl: 'placeholder-value',
|
|
8133
|
-
* // Set of properties to return. Defaults to full.
|
|
8134
|
-
* projection: 'placeholder-value',
|
|
8135
|
-
* // The project to be billed for this request, for Requester Pays buckets.
|
|
8136
|
-
* userProject: 'placeholder-value',
|
|
8137
|
-
*
|
|
8138
|
-
* // Request body metadata
|
|
8139
|
-
* requestBody: {
|
|
8140
|
-
* // request body parameters
|
|
8141
|
-
* // {
|
|
8142
|
-
* // "acl": [],
|
|
8143
|
-
* // "bucket": "my_bucket",
|
|
8144
|
-
* // "cacheControl": "my_cacheControl",
|
|
8145
|
-
* // "componentCount": 0,
|
|
8146
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
8147
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
8148
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
8149
|
-
* // "contentType": "my_contentType",
|
|
8150
|
-
* // "crc32c": "my_crc32c",
|
|
8151
|
-
* // "customTime": "my_customTime",
|
|
8152
|
-
* // "customerEncryption": {},
|
|
8153
|
-
* // "etag": "my_etag",
|
|
8154
|
-
* // "eventBasedHold": false,
|
|
8155
|
-
* // "generation": "my_generation",
|
|
8156
|
-
* // "id": "my_id",
|
|
8157
|
-
* // "kind": "my_kind",
|
|
8158
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
8159
|
-
* // "md5Hash": "my_md5Hash",
|
|
8160
|
-
* // "mediaLink": "my_mediaLink",
|
|
8161
|
-
* // "metadata": {},
|
|
8162
|
-
* // "metageneration": "my_metageneration",
|
|
8163
|
-
* // "name": "my_name",
|
|
8164
|
-
* // "owner": {},
|
|
8165
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
8166
|
-
* // "selfLink": "my_selfLink",
|
|
8167
|
-
* // "size": "my_size",
|
|
8168
|
-
* // "storageClass": "my_storageClass",
|
|
8169
|
-
* // "temporaryHold": false,
|
|
8170
|
-
* // "timeCreated": "my_timeCreated",
|
|
8171
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
8172
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
8173
|
-
* // "updated": "my_updated"
|
|
8174
|
-
* // }
|
|
8175
|
-
* },
|
|
8176
|
-
* });
|
|
8177
|
-
* console.log(res.data);
|
|
8178
|
-
*
|
|
8179
|
-
* // Example response
|
|
8180
|
-
* // {
|
|
8181
|
-
* // "acl": [],
|
|
8182
|
-
* // "bucket": "my_bucket",
|
|
8183
|
-
* // "cacheControl": "my_cacheControl",
|
|
8184
|
-
* // "componentCount": 0,
|
|
8185
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
8186
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
8187
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
8188
|
-
* // "contentType": "my_contentType",
|
|
8189
|
-
* // "crc32c": "my_crc32c",
|
|
8190
|
-
* // "customTime": "my_customTime",
|
|
8191
|
-
* // "customerEncryption": {},
|
|
8192
|
-
* // "etag": "my_etag",
|
|
8193
|
-
* // "eventBasedHold": false,
|
|
8194
|
-
* // "generation": "my_generation",
|
|
8195
|
-
* // "id": "my_id",
|
|
8196
|
-
* // "kind": "my_kind",
|
|
8197
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
8198
|
-
* // "md5Hash": "my_md5Hash",
|
|
8199
|
-
* // "mediaLink": "my_mediaLink",
|
|
8200
|
-
* // "metadata": {},
|
|
8201
|
-
* // "metageneration": "my_metageneration",
|
|
8202
|
-
* // "name": "my_name",
|
|
8203
|
-
* // "owner": {},
|
|
8204
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
8205
|
-
* // "selfLink": "my_selfLink",
|
|
8206
|
-
* // "size": "my_size",
|
|
8207
|
-
* // "storageClass": "my_storageClass",
|
|
8208
|
-
* // "temporaryHold": false,
|
|
8209
|
-
* // "timeCreated": "my_timeCreated",
|
|
8210
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
8211
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
8212
|
-
* // "updated": "my_updated"
|
|
8213
|
-
* // }
|
|
8214
|
-
* }
|
|
8215
|
-
*
|
|
8216
|
-
* main().catch(e => {
|
|
8217
|
-
* console.error(e);
|
|
8218
|
-
* throw e;
|
|
8219
|
-
* });
|
|
8220
|
-
*
|
|
8221
|
-
* ```
|
|
8222
5134
|
*
|
|
8223
5135
|
* @param params - Parameters for request
|
|
8224
5136
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8305,132 +5217,6 @@ export namespace storage_v1 {
|
|
|
8305
5217
|
|
|
8306
5218
|
/**
|
|
8307
5219
|
* Rewrites a source object to a destination object. Optionally overrides metadata.
|
|
8308
|
-
* @example
|
|
8309
|
-
* ```js
|
|
8310
|
-
* // Before running the sample:
|
|
8311
|
-
* // - Enable the API at:
|
|
8312
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
8313
|
-
* // - Login into gcloud by running:
|
|
8314
|
-
* // `$ gcloud auth application-default login`
|
|
8315
|
-
* // - Install the npm module by running:
|
|
8316
|
-
* // `$ npm install googleapis`
|
|
8317
|
-
*
|
|
8318
|
-
* const {google} = require('googleapis');
|
|
8319
|
-
* const storage = google.storage('v1');
|
|
8320
|
-
*
|
|
8321
|
-
* async function main() {
|
|
8322
|
-
* const auth = new google.auth.GoogleAuth({
|
|
8323
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8324
|
-
* scopes: [
|
|
8325
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8326
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
8327
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
8328
|
-
* ],
|
|
8329
|
-
* });
|
|
8330
|
-
*
|
|
8331
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
8332
|
-
* const authClient = await auth.getClient();
|
|
8333
|
-
* google.options({auth: authClient});
|
|
8334
|
-
*
|
|
8335
|
-
* // Do the magic
|
|
8336
|
-
* const res = await storage.objects.rewrite({
|
|
8337
|
-
* // Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
|
|
8338
|
-
* destinationBucket: 'placeholder-value',
|
|
8339
|
-
* // Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.
|
|
8340
|
-
* destinationKmsKeyName: 'placeholder-value',
|
|
8341
|
-
* // Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
8342
|
-
* destinationObject: 'placeholder-value',
|
|
8343
|
-
* // Apply a predefined set of access controls to the destination object.
|
|
8344
|
-
* destinationPredefinedAcl: 'placeholder-value',
|
|
8345
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
8346
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
8347
|
-
* // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
8348
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
8349
|
-
* // Makes the operation conditional on whether the destination object's current metageneration matches the given value.
|
|
8350
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
8351
|
-
* // Makes the operation conditional on whether the destination object's current metageneration does not match the given value.
|
|
8352
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
8353
|
-
* // Makes the operation conditional on whether the source object's current generation matches the given value.
|
|
8354
|
-
* ifSourceGenerationMatch: 'placeholder-value',
|
|
8355
|
-
* // Makes the operation conditional on whether the source object's current generation does not match the given value.
|
|
8356
|
-
* ifSourceGenerationNotMatch: 'placeholder-value',
|
|
8357
|
-
* // Makes the operation conditional on whether the source object's current metageneration matches the given value.
|
|
8358
|
-
* ifSourceMetagenerationMatch: 'placeholder-value',
|
|
8359
|
-
* // Makes the operation conditional on whether the source object's current metageneration does not match the given value.
|
|
8360
|
-
* ifSourceMetagenerationNotMatch: 'placeholder-value',
|
|
8361
|
-
* // The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.
|
|
8362
|
-
* maxBytesRewrittenPerCall: 'placeholder-value',
|
|
8363
|
-
* // Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
|
|
8364
|
-
* projection: 'placeholder-value',
|
|
8365
|
-
* // Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.
|
|
8366
|
-
* rewriteToken: 'placeholder-value',
|
|
8367
|
-
* // Name of the bucket in which to find the source object.
|
|
8368
|
-
* sourceBucket: 'placeholder-value',
|
|
8369
|
-
* // If present, selects a specific revision of the source object (as opposed to the latest version, the default).
|
|
8370
|
-
* sourceGeneration: 'placeholder-value',
|
|
8371
|
-
* // Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
8372
|
-
* sourceObject: 'placeholder-value',
|
|
8373
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
8374
|
-
* userProject: 'placeholder-value',
|
|
8375
|
-
*
|
|
8376
|
-
* // Request body metadata
|
|
8377
|
-
* requestBody: {
|
|
8378
|
-
* // request body parameters
|
|
8379
|
-
* // {
|
|
8380
|
-
* // "acl": [],
|
|
8381
|
-
* // "bucket": "my_bucket",
|
|
8382
|
-
* // "cacheControl": "my_cacheControl",
|
|
8383
|
-
* // "componentCount": 0,
|
|
8384
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
8385
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
8386
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
8387
|
-
* // "contentType": "my_contentType",
|
|
8388
|
-
* // "crc32c": "my_crc32c",
|
|
8389
|
-
* // "customTime": "my_customTime",
|
|
8390
|
-
* // "customerEncryption": {},
|
|
8391
|
-
* // "etag": "my_etag",
|
|
8392
|
-
* // "eventBasedHold": false,
|
|
8393
|
-
* // "generation": "my_generation",
|
|
8394
|
-
* // "id": "my_id",
|
|
8395
|
-
* // "kind": "my_kind",
|
|
8396
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
8397
|
-
* // "md5Hash": "my_md5Hash",
|
|
8398
|
-
* // "mediaLink": "my_mediaLink",
|
|
8399
|
-
* // "metadata": {},
|
|
8400
|
-
* // "metageneration": "my_metageneration",
|
|
8401
|
-
* // "name": "my_name",
|
|
8402
|
-
* // "owner": {},
|
|
8403
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
8404
|
-
* // "selfLink": "my_selfLink",
|
|
8405
|
-
* // "size": "my_size",
|
|
8406
|
-
* // "storageClass": "my_storageClass",
|
|
8407
|
-
* // "temporaryHold": false,
|
|
8408
|
-
* // "timeCreated": "my_timeCreated",
|
|
8409
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
8410
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
8411
|
-
* // "updated": "my_updated"
|
|
8412
|
-
* // }
|
|
8413
|
-
* },
|
|
8414
|
-
* });
|
|
8415
|
-
* console.log(res.data);
|
|
8416
|
-
*
|
|
8417
|
-
* // Example response
|
|
8418
|
-
* // {
|
|
8419
|
-
* // "done": false,
|
|
8420
|
-
* // "kind": "my_kind",
|
|
8421
|
-
* // "objectSize": "my_objectSize",
|
|
8422
|
-
* // "resource": {},
|
|
8423
|
-
* // "rewriteToken": "my_rewriteToken",
|
|
8424
|
-
* // "totalBytesRewritten": "my_totalBytesRewritten"
|
|
8425
|
-
* // }
|
|
8426
|
-
* }
|
|
8427
|
-
*
|
|
8428
|
-
* main().catch(e => {
|
|
8429
|
-
* console.error(e);
|
|
8430
|
-
* throw e;
|
|
8431
|
-
* });
|
|
8432
|
-
*
|
|
8433
|
-
* ```
|
|
8434
5220
|
*
|
|
8435
5221
|
* @param params - Parameters for request
|
|
8436
5222
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8527,74 +5313,6 @@ export namespace storage_v1 {
|
|
|
8527
5313
|
|
|
8528
5314
|
/**
|
|
8529
5315
|
* Updates an IAM policy for the specified object.
|
|
8530
|
-
* @example
|
|
8531
|
-
* ```js
|
|
8532
|
-
* // Before running the sample:
|
|
8533
|
-
* // - Enable the API at:
|
|
8534
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
8535
|
-
* // - Login into gcloud by running:
|
|
8536
|
-
* // `$ gcloud auth application-default login`
|
|
8537
|
-
* // - Install the npm module by running:
|
|
8538
|
-
* // `$ npm install googleapis`
|
|
8539
|
-
*
|
|
8540
|
-
* const {google} = require('googleapis');
|
|
8541
|
-
* const storage = google.storage('v1');
|
|
8542
|
-
*
|
|
8543
|
-
* async function main() {
|
|
8544
|
-
* const auth = new google.auth.GoogleAuth({
|
|
8545
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8546
|
-
* scopes: [
|
|
8547
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8548
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
8549
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
8550
|
-
* ],
|
|
8551
|
-
* });
|
|
8552
|
-
*
|
|
8553
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
8554
|
-
* const authClient = await auth.getClient();
|
|
8555
|
-
* google.options({auth: authClient});
|
|
8556
|
-
*
|
|
8557
|
-
* // Do the magic
|
|
8558
|
-
* const res = await storage.objects.setIamPolicy({
|
|
8559
|
-
* // Name of the bucket in which the object resides.
|
|
8560
|
-
* bucket: 'placeholder-value',
|
|
8561
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
8562
|
-
* generation: 'placeholder-value',
|
|
8563
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
8564
|
-
* object: 'placeholder-value',
|
|
8565
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
8566
|
-
* userProject: 'placeholder-value',
|
|
8567
|
-
*
|
|
8568
|
-
* // Request body metadata
|
|
8569
|
-
* requestBody: {
|
|
8570
|
-
* // request body parameters
|
|
8571
|
-
* // {
|
|
8572
|
-
* // "bindings": [],
|
|
8573
|
-
* // "etag": "my_etag",
|
|
8574
|
-
* // "kind": "my_kind",
|
|
8575
|
-
* // "resourceId": "my_resourceId",
|
|
8576
|
-
* // "version": 0
|
|
8577
|
-
* // }
|
|
8578
|
-
* },
|
|
8579
|
-
* });
|
|
8580
|
-
* console.log(res.data);
|
|
8581
|
-
*
|
|
8582
|
-
* // Example response
|
|
8583
|
-
* // {
|
|
8584
|
-
* // "bindings": [],
|
|
8585
|
-
* // "etag": "my_etag",
|
|
8586
|
-
* // "kind": "my_kind",
|
|
8587
|
-
* // "resourceId": "my_resourceId",
|
|
8588
|
-
* // "version": 0
|
|
8589
|
-
* // }
|
|
8590
|
-
* }
|
|
8591
|
-
*
|
|
8592
|
-
* main().catch(e => {
|
|
8593
|
-
* console.error(e);
|
|
8594
|
-
* throw e;
|
|
8595
|
-
* });
|
|
8596
|
-
*
|
|
8597
|
-
* ```
|
|
8598
5316
|
*
|
|
8599
5317
|
* @param params - Parameters for request
|
|
8600
5318
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8682,63 +5400,6 @@ export namespace storage_v1 {
|
|
|
8682
5400
|
|
|
8683
5401
|
/**
|
|
8684
5402
|
* Tests a set of permissions on the given object to see which, if any, are held by the caller.
|
|
8685
|
-
* @example
|
|
8686
|
-
* ```js
|
|
8687
|
-
* // Before running the sample:
|
|
8688
|
-
* // - Enable the API at:
|
|
8689
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
8690
|
-
* // - Login into gcloud by running:
|
|
8691
|
-
* // `$ gcloud auth application-default login`
|
|
8692
|
-
* // - Install the npm module by running:
|
|
8693
|
-
* // `$ npm install googleapis`
|
|
8694
|
-
*
|
|
8695
|
-
* const {google} = require('googleapis');
|
|
8696
|
-
* const storage = google.storage('v1');
|
|
8697
|
-
*
|
|
8698
|
-
* async function main() {
|
|
8699
|
-
* const auth = new google.auth.GoogleAuth({
|
|
8700
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8701
|
-
* scopes: [
|
|
8702
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8703
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
8704
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
8705
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
8706
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
8707
|
-
* ],
|
|
8708
|
-
* });
|
|
8709
|
-
*
|
|
8710
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
8711
|
-
* const authClient = await auth.getClient();
|
|
8712
|
-
* google.options({auth: authClient});
|
|
8713
|
-
*
|
|
8714
|
-
* // Do the magic
|
|
8715
|
-
* const res = await storage.objects.testIamPermissions({
|
|
8716
|
-
* // Name of the bucket in which the object resides.
|
|
8717
|
-
* bucket: 'placeholder-value',
|
|
8718
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
8719
|
-
* generation: 'placeholder-value',
|
|
8720
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
8721
|
-
* object: 'placeholder-value',
|
|
8722
|
-
* // Permissions to test.
|
|
8723
|
-
* permissions: 'placeholder-value',
|
|
8724
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
8725
|
-
* userProject: 'placeholder-value',
|
|
8726
|
-
* });
|
|
8727
|
-
* console.log(res.data);
|
|
8728
|
-
*
|
|
8729
|
-
* // Example response
|
|
8730
|
-
* // {
|
|
8731
|
-
* // "kind": "my_kind",
|
|
8732
|
-
* // "permissions": []
|
|
8733
|
-
* // }
|
|
8734
|
-
* }
|
|
8735
|
-
*
|
|
8736
|
-
* main().catch(e => {
|
|
8737
|
-
* console.error(e);
|
|
8738
|
-
* throw e;
|
|
8739
|
-
* });
|
|
8740
|
-
*
|
|
8741
|
-
* ```
|
|
8742
5403
|
*
|
|
8743
5404
|
* @param params - Parameters for request
|
|
8744
5405
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -8832,139 +5493,6 @@ export namespace storage_v1 {
|
|
|
8832
5493
|
|
|
8833
5494
|
/**
|
|
8834
5495
|
* Updates an object's metadata.
|
|
8835
|
-
* @example
|
|
8836
|
-
* ```js
|
|
8837
|
-
* // Before running the sample:
|
|
8838
|
-
* // - Enable the API at:
|
|
8839
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
8840
|
-
* // - Login into gcloud by running:
|
|
8841
|
-
* // `$ gcloud auth application-default login`
|
|
8842
|
-
* // - Install the npm module by running:
|
|
8843
|
-
* // `$ npm install googleapis`
|
|
8844
|
-
*
|
|
8845
|
-
* const {google} = require('googleapis');
|
|
8846
|
-
* const storage = google.storage('v1');
|
|
8847
|
-
*
|
|
8848
|
-
* async function main() {
|
|
8849
|
-
* const auth = new google.auth.GoogleAuth({
|
|
8850
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8851
|
-
* scopes: [
|
|
8852
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8853
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
8854
|
-
* ],
|
|
8855
|
-
* });
|
|
8856
|
-
*
|
|
8857
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
8858
|
-
* const authClient = await auth.getClient();
|
|
8859
|
-
* google.options({auth: authClient});
|
|
8860
|
-
*
|
|
8861
|
-
* // Do the magic
|
|
8862
|
-
* const res = await storage.objects.update({
|
|
8863
|
-
* // Name of the bucket in which the object resides.
|
|
8864
|
-
* bucket: 'placeholder-value',
|
|
8865
|
-
* // If present, selects a specific revision of this object (as opposed to the latest version, the default).
|
|
8866
|
-
* generation: 'placeholder-value',
|
|
8867
|
-
* // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
|
|
8868
|
-
* ifGenerationMatch: 'placeholder-value',
|
|
8869
|
-
* // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
|
|
8870
|
-
* ifGenerationNotMatch: 'placeholder-value',
|
|
8871
|
-
* // Makes the operation conditional on whether the object's current metageneration matches the given value.
|
|
8872
|
-
* ifMetagenerationMatch: 'placeholder-value',
|
|
8873
|
-
* // Makes the operation conditional on whether the object's current metageneration does not match the given value.
|
|
8874
|
-
* ifMetagenerationNotMatch: 'placeholder-value',
|
|
8875
|
-
* // Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
|
8876
|
-
* object: 'placeholder-value',
|
|
8877
|
-
* // Apply a predefined set of access controls to this object.
|
|
8878
|
-
* predefinedAcl: 'placeholder-value',
|
|
8879
|
-
* // Set of properties to return. Defaults to full.
|
|
8880
|
-
* projection: 'placeholder-value',
|
|
8881
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
8882
|
-
* userProject: 'placeholder-value',
|
|
8883
|
-
*
|
|
8884
|
-
* // Request body metadata
|
|
8885
|
-
* requestBody: {
|
|
8886
|
-
* // request body parameters
|
|
8887
|
-
* // {
|
|
8888
|
-
* // "acl": [],
|
|
8889
|
-
* // "bucket": "my_bucket",
|
|
8890
|
-
* // "cacheControl": "my_cacheControl",
|
|
8891
|
-
* // "componentCount": 0,
|
|
8892
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
8893
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
8894
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
8895
|
-
* // "contentType": "my_contentType",
|
|
8896
|
-
* // "crc32c": "my_crc32c",
|
|
8897
|
-
* // "customTime": "my_customTime",
|
|
8898
|
-
* // "customerEncryption": {},
|
|
8899
|
-
* // "etag": "my_etag",
|
|
8900
|
-
* // "eventBasedHold": false,
|
|
8901
|
-
* // "generation": "my_generation",
|
|
8902
|
-
* // "id": "my_id",
|
|
8903
|
-
* // "kind": "my_kind",
|
|
8904
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
8905
|
-
* // "md5Hash": "my_md5Hash",
|
|
8906
|
-
* // "mediaLink": "my_mediaLink",
|
|
8907
|
-
* // "metadata": {},
|
|
8908
|
-
* // "metageneration": "my_metageneration",
|
|
8909
|
-
* // "name": "my_name",
|
|
8910
|
-
* // "owner": {},
|
|
8911
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
8912
|
-
* // "selfLink": "my_selfLink",
|
|
8913
|
-
* // "size": "my_size",
|
|
8914
|
-
* // "storageClass": "my_storageClass",
|
|
8915
|
-
* // "temporaryHold": false,
|
|
8916
|
-
* // "timeCreated": "my_timeCreated",
|
|
8917
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
8918
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
8919
|
-
* // "updated": "my_updated"
|
|
8920
|
-
* // }
|
|
8921
|
-
* },
|
|
8922
|
-
* });
|
|
8923
|
-
* console.log(res.data);
|
|
8924
|
-
*
|
|
8925
|
-
* // Example response
|
|
8926
|
-
* // {
|
|
8927
|
-
* // "acl": [],
|
|
8928
|
-
* // "bucket": "my_bucket",
|
|
8929
|
-
* // "cacheControl": "my_cacheControl",
|
|
8930
|
-
* // "componentCount": 0,
|
|
8931
|
-
* // "contentDisposition": "my_contentDisposition",
|
|
8932
|
-
* // "contentEncoding": "my_contentEncoding",
|
|
8933
|
-
* // "contentLanguage": "my_contentLanguage",
|
|
8934
|
-
* // "contentType": "my_contentType",
|
|
8935
|
-
* // "crc32c": "my_crc32c",
|
|
8936
|
-
* // "customTime": "my_customTime",
|
|
8937
|
-
* // "customerEncryption": {},
|
|
8938
|
-
* // "etag": "my_etag",
|
|
8939
|
-
* // "eventBasedHold": false,
|
|
8940
|
-
* // "generation": "my_generation",
|
|
8941
|
-
* // "id": "my_id",
|
|
8942
|
-
* // "kind": "my_kind",
|
|
8943
|
-
* // "kmsKeyName": "my_kmsKeyName",
|
|
8944
|
-
* // "md5Hash": "my_md5Hash",
|
|
8945
|
-
* // "mediaLink": "my_mediaLink",
|
|
8946
|
-
* // "metadata": {},
|
|
8947
|
-
* // "metageneration": "my_metageneration",
|
|
8948
|
-
* // "name": "my_name",
|
|
8949
|
-
* // "owner": {},
|
|
8950
|
-
* // "retentionExpirationTime": "my_retentionExpirationTime",
|
|
8951
|
-
* // "selfLink": "my_selfLink",
|
|
8952
|
-
* // "size": "my_size",
|
|
8953
|
-
* // "storageClass": "my_storageClass",
|
|
8954
|
-
* // "temporaryHold": false,
|
|
8955
|
-
* // "timeCreated": "my_timeCreated",
|
|
8956
|
-
* // "timeDeleted": "my_timeDeleted",
|
|
8957
|
-
* // "timeStorageClassUpdated": "my_timeStorageClassUpdated",
|
|
8958
|
-
* // "updated": "my_updated"
|
|
8959
|
-
* // }
|
|
8960
|
-
* }
|
|
8961
|
-
*
|
|
8962
|
-
* main().catch(e => {
|
|
8963
|
-
* console.error(e);
|
|
8964
|
-
* throw e;
|
|
8965
|
-
* });
|
|
8966
|
-
*
|
|
8967
|
-
* ```
|
|
8968
5496
|
*
|
|
8969
5497
|
* @param params - Parameters for request
|
|
8970
5498
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9051,100 +5579,6 @@ export namespace storage_v1 {
|
|
|
9051
5579
|
|
|
9052
5580
|
/**
|
|
9053
5581
|
* Watch for changes on all objects in a bucket.
|
|
9054
|
-
* @example
|
|
9055
|
-
* ```js
|
|
9056
|
-
* // Before running the sample:
|
|
9057
|
-
* // - Enable the API at:
|
|
9058
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
9059
|
-
* // - Login into gcloud by running:
|
|
9060
|
-
* // `$ gcloud auth application-default login`
|
|
9061
|
-
* // - Install the npm module by running:
|
|
9062
|
-
* // `$ npm install googleapis`
|
|
9063
|
-
*
|
|
9064
|
-
* const {google} = require('googleapis');
|
|
9065
|
-
* const storage = google.storage('v1');
|
|
9066
|
-
*
|
|
9067
|
-
* async function main() {
|
|
9068
|
-
* const auth = new google.auth.GoogleAuth({
|
|
9069
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9070
|
-
* scopes: [
|
|
9071
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
9072
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
9073
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
9074
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
9075
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
9076
|
-
* ],
|
|
9077
|
-
* });
|
|
9078
|
-
*
|
|
9079
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
9080
|
-
* const authClient = await auth.getClient();
|
|
9081
|
-
* google.options({auth: authClient});
|
|
9082
|
-
*
|
|
9083
|
-
* // Do the magic
|
|
9084
|
-
* const res = await storage.objects.watchAll({
|
|
9085
|
-
* // Name of the bucket in which to look for objects.
|
|
9086
|
-
* bucket: 'placeholder-value',
|
|
9087
|
-
* // Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.
|
|
9088
|
-
* delimiter: 'placeholder-value',
|
|
9089
|
-
* // Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
|
|
9090
|
-
* endOffset: 'placeholder-value',
|
|
9091
|
-
* // If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.
|
|
9092
|
-
* includeTrailingDelimiter: 'placeholder-value',
|
|
9093
|
-
* // Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.
|
|
9094
|
-
* maxResults: 'placeholder-value',
|
|
9095
|
-
* // A previously-returned page token representing part of the larger set of results to view.
|
|
9096
|
-
* pageToken: 'placeholder-value',
|
|
9097
|
-
* // Filter results to objects whose names begin with this prefix.
|
|
9098
|
-
* prefix: 'placeholder-value',
|
|
9099
|
-
* // Set of properties to return. Defaults to noAcl.
|
|
9100
|
-
* projection: 'placeholder-value',
|
|
9101
|
-
* // Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
|
|
9102
|
-
* startOffset: 'placeholder-value',
|
|
9103
|
-
* // The project to be billed for this request. Required for Requester Pays buckets.
|
|
9104
|
-
* userProject: 'placeholder-value',
|
|
9105
|
-
* // If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.
|
|
9106
|
-
* versions: 'placeholder-value',
|
|
9107
|
-
*
|
|
9108
|
-
* // Request body metadata
|
|
9109
|
-
* requestBody: {
|
|
9110
|
-
* // request body parameters
|
|
9111
|
-
* // {
|
|
9112
|
-
* // "address": "my_address",
|
|
9113
|
-
* // "expiration": "my_expiration",
|
|
9114
|
-
* // "id": "my_id",
|
|
9115
|
-
* // "kind": "my_kind",
|
|
9116
|
-
* // "params": {},
|
|
9117
|
-
* // "payload": false,
|
|
9118
|
-
* // "resourceId": "my_resourceId",
|
|
9119
|
-
* // "resourceUri": "my_resourceUri",
|
|
9120
|
-
* // "token": "my_token",
|
|
9121
|
-
* // "type": "my_type"
|
|
9122
|
-
* // }
|
|
9123
|
-
* },
|
|
9124
|
-
* });
|
|
9125
|
-
* console.log(res.data);
|
|
9126
|
-
*
|
|
9127
|
-
* // Example response
|
|
9128
|
-
* // {
|
|
9129
|
-
* // "address": "my_address",
|
|
9130
|
-
* // "expiration": "my_expiration",
|
|
9131
|
-
* // "id": "my_id",
|
|
9132
|
-
* // "kind": "my_kind",
|
|
9133
|
-
* // "params": {},
|
|
9134
|
-
* // "payload": false,
|
|
9135
|
-
* // "resourceId": "my_resourceId",
|
|
9136
|
-
* // "resourceUri": "my_resourceUri",
|
|
9137
|
-
* // "token": "my_token",
|
|
9138
|
-
* // "type": "my_type"
|
|
9139
|
-
* // }
|
|
9140
|
-
* }
|
|
9141
|
-
*
|
|
9142
|
-
* main().catch(e => {
|
|
9143
|
-
* console.error(e);
|
|
9144
|
-
* throw e;
|
|
9145
|
-
* });
|
|
9146
|
-
*
|
|
9147
|
-
* ```
|
|
9148
5582
|
*
|
|
9149
5583
|
* @param params - Parameters for request
|
|
9150
5584
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9842,57 +6276,6 @@ export namespace storage_v1 {
|
|
|
9842
6276
|
|
|
9843
6277
|
/**
|
|
9844
6278
|
* Creates a new HMAC key for the specified service account.
|
|
9845
|
-
* @example
|
|
9846
|
-
* ```js
|
|
9847
|
-
* // Before running the sample:
|
|
9848
|
-
* // - Enable the API at:
|
|
9849
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
9850
|
-
* // - Login into gcloud by running:
|
|
9851
|
-
* // `$ gcloud auth application-default login`
|
|
9852
|
-
* // - Install the npm module by running:
|
|
9853
|
-
* // `$ npm install googleapis`
|
|
9854
|
-
*
|
|
9855
|
-
* const {google} = require('googleapis');
|
|
9856
|
-
* const storage = google.storage('v1');
|
|
9857
|
-
*
|
|
9858
|
-
* async function main() {
|
|
9859
|
-
* const auth = new google.auth.GoogleAuth({
|
|
9860
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9861
|
-
* scopes: [
|
|
9862
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
9863
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
9864
|
-
* ],
|
|
9865
|
-
* });
|
|
9866
|
-
*
|
|
9867
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
9868
|
-
* const authClient = await auth.getClient();
|
|
9869
|
-
* google.options({auth: authClient});
|
|
9870
|
-
*
|
|
9871
|
-
* // Do the magic
|
|
9872
|
-
* const res = await storage.projects.hmacKeys.create({
|
|
9873
|
-
* // Project ID owning the service account.
|
|
9874
|
-
* projectId: 'placeholder-value',
|
|
9875
|
-
* // Email address of the service account.
|
|
9876
|
-
* serviceAccountEmail: 'placeholder-value',
|
|
9877
|
-
* // The project to be billed for this request.
|
|
9878
|
-
* userProject: 'placeholder-value',
|
|
9879
|
-
* });
|
|
9880
|
-
* console.log(res.data);
|
|
9881
|
-
*
|
|
9882
|
-
* // Example response
|
|
9883
|
-
* // {
|
|
9884
|
-
* // "kind": "my_kind",
|
|
9885
|
-
* // "metadata": {},
|
|
9886
|
-
* // "secret": "my_secret"
|
|
9887
|
-
* // }
|
|
9888
|
-
* }
|
|
9889
|
-
*
|
|
9890
|
-
* main().catch(e => {
|
|
9891
|
-
* console.error(e);
|
|
9892
|
-
* throw e;
|
|
9893
|
-
* });
|
|
9894
|
-
*
|
|
9895
|
-
* ```
|
|
9896
6279
|
*
|
|
9897
6280
|
* @param params - Parameters for request
|
|
9898
6281
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -9979,51 +6362,6 @@ export namespace storage_v1 {
|
|
|
9979
6362
|
|
|
9980
6363
|
/**
|
|
9981
6364
|
* Deletes an HMAC key.
|
|
9982
|
-
* @example
|
|
9983
|
-
* ```js
|
|
9984
|
-
* // Before running the sample:
|
|
9985
|
-
* // - Enable the API at:
|
|
9986
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
9987
|
-
* // - Login into gcloud by running:
|
|
9988
|
-
* // `$ gcloud auth application-default login`
|
|
9989
|
-
* // - Install the npm module by running:
|
|
9990
|
-
* // `$ npm install googleapis`
|
|
9991
|
-
*
|
|
9992
|
-
* const {google} = require('googleapis');
|
|
9993
|
-
* const storage = google.storage('v1');
|
|
9994
|
-
*
|
|
9995
|
-
* async function main() {
|
|
9996
|
-
* const auth = new google.auth.GoogleAuth({
|
|
9997
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9998
|
-
* scopes: [
|
|
9999
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
10000
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
10001
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
10002
|
-
* ],
|
|
10003
|
-
* });
|
|
10004
|
-
*
|
|
10005
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
10006
|
-
* const authClient = await auth.getClient();
|
|
10007
|
-
* google.options({auth: authClient});
|
|
10008
|
-
*
|
|
10009
|
-
* // Do the magic
|
|
10010
|
-
* const res = await storage.projects.hmacKeys.delete({
|
|
10011
|
-
* // Name of the HMAC key to be deleted.
|
|
10012
|
-
* accessId: 'placeholder-value',
|
|
10013
|
-
* // Project ID owning the requested key
|
|
10014
|
-
* projectId: 'placeholder-value',
|
|
10015
|
-
* // The project to be billed for this request.
|
|
10016
|
-
* userProject: 'placeholder-value',
|
|
10017
|
-
* });
|
|
10018
|
-
* console.log(res.data);
|
|
10019
|
-
* }
|
|
10020
|
-
*
|
|
10021
|
-
* main().catch(e => {
|
|
10022
|
-
* console.error(e);
|
|
10023
|
-
* throw e;
|
|
10024
|
-
* });
|
|
10025
|
-
*
|
|
10026
|
-
* ```
|
|
10027
6365
|
*
|
|
10028
6366
|
* @param params - Parameters for request
|
|
10029
6367
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10108,66 +6446,6 @@ export namespace storage_v1 {
|
|
|
10108
6446
|
|
|
10109
6447
|
/**
|
|
10110
6448
|
* Retrieves an HMAC key's metadata
|
|
10111
|
-
* @example
|
|
10112
|
-
* ```js
|
|
10113
|
-
* // Before running the sample:
|
|
10114
|
-
* // - Enable the API at:
|
|
10115
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
10116
|
-
* // - Login into gcloud by running:
|
|
10117
|
-
* // `$ gcloud auth application-default login`
|
|
10118
|
-
* // - Install the npm module by running:
|
|
10119
|
-
* // `$ npm install googleapis`
|
|
10120
|
-
*
|
|
10121
|
-
* const {google} = require('googleapis');
|
|
10122
|
-
* const storage = google.storage('v1');
|
|
10123
|
-
*
|
|
10124
|
-
* async function main() {
|
|
10125
|
-
* const auth = new google.auth.GoogleAuth({
|
|
10126
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10127
|
-
* scopes: [
|
|
10128
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
10129
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
10130
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
10131
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
10132
|
-
* ],
|
|
10133
|
-
* });
|
|
10134
|
-
*
|
|
10135
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
10136
|
-
* const authClient = await auth.getClient();
|
|
10137
|
-
* google.options({auth: authClient});
|
|
10138
|
-
*
|
|
10139
|
-
* // Do the magic
|
|
10140
|
-
* const res = await storage.projects.hmacKeys.get({
|
|
10141
|
-
* // Name of the HMAC key.
|
|
10142
|
-
* accessId: 'placeholder-value',
|
|
10143
|
-
* // Project ID owning the service account of the requested key.
|
|
10144
|
-
* projectId: 'placeholder-value',
|
|
10145
|
-
* // The project to be billed for this request.
|
|
10146
|
-
* userProject: 'placeholder-value',
|
|
10147
|
-
* });
|
|
10148
|
-
* console.log(res.data);
|
|
10149
|
-
*
|
|
10150
|
-
* // Example response
|
|
10151
|
-
* // {
|
|
10152
|
-
* // "accessId": "my_accessId",
|
|
10153
|
-
* // "etag": "my_etag",
|
|
10154
|
-
* // "id": "my_id",
|
|
10155
|
-
* // "kind": "my_kind",
|
|
10156
|
-
* // "projectId": "my_projectId",
|
|
10157
|
-
* // "selfLink": "my_selfLink",
|
|
10158
|
-
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
10159
|
-
* // "state": "my_state",
|
|
10160
|
-
* // "timeCreated": "my_timeCreated",
|
|
10161
|
-
* // "updated": "my_updated"
|
|
10162
|
-
* // }
|
|
10163
|
-
* }
|
|
10164
|
-
*
|
|
10165
|
-
* main().catch(e => {
|
|
10166
|
-
* console.error(e);
|
|
10167
|
-
* throw e;
|
|
10168
|
-
* });
|
|
10169
|
-
*
|
|
10170
|
-
* ```
|
|
10171
6449
|
*
|
|
10172
6450
|
* @param params - Parameters for request
|
|
10173
6451
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10254,65 +6532,6 @@ export namespace storage_v1 {
|
|
|
10254
6532
|
|
|
10255
6533
|
/**
|
|
10256
6534
|
* Retrieves a list of HMAC keys matching the criteria.
|
|
10257
|
-
* @example
|
|
10258
|
-
* ```js
|
|
10259
|
-
* // Before running the sample:
|
|
10260
|
-
* // - Enable the API at:
|
|
10261
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
10262
|
-
* // - Login into gcloud by running:
|
|
10263
|
-
* // `$ gcloud auth application-default login`
|
|
10264
|
-
* // - Install the npm module by running:
|
|
10265
|
-
* // `$ npm install googleapis`
|
|
10266
|
-
*
|
|
10267
|
-
* const {google} = require('googleapis');
|
|
10268
|
-
* const storage = google.storage('v1');
|
|
10269
|
-
*
|
|
10270
|
-
* async function main() {
|
|
10271
|
-
* const auth = new google.auth.GoogleAuth({
|
|
10272
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10273
|
-
* scopes: [
|
|
10274
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
10275
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
10276
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
10277
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
10278
|
-
* ],
|
|
10279
|
-
* });
|
|
10280
|
-
*
|
|
10281
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
10282
|
-
* const authClient = await auth.getClient();
|
|
10283
|
-
* google.options({auth: authClient});
|
|
10284
|
-
*
|
|
10285
|
-
* // Do the magic
|
|
10286
|
-
* const res = await storage.projects.hmacKeys.list({
|
|
10287
|
-
* // Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.
|
|
10288
|
-
* maxResults: 'placeholder-value',
|
|
10289
|
-
* // A previously-returned page token representing part of the larger set of results to view.
|
|
10290
|
-
* pageToken: 'placeholder-value',
|
|
10291
|
-
* // Name of the project in which to look for HMAC keys.
|
|
10292
|
-
* projectId: 'placeholder-value',
|
|
10293
|
-
* // If present, only keys for the given service account are returned.
|
|
10294
|
-
* serviceAccountEmail: 'placeholder-value',
|
|
10295
|
-
* // Whether or not to show keys in the DELETED state.
|
|
10296
|
-
* showDeletedKeys: 'placeholder-value',
|
|
10297
|
-
* // The project to be billed for this request.
|
|
10298
|
-
* userProject: 'placeholder-value',
|
|
10299
|
-
* });
|
|
10300
|
-
* console.log(res.data);
|
|
10301
|
-
*
|
|
10302
|
-
* // Example response
|
|
10303
|
-
* // {
|
|
10304
|
-
* // "items": [],
|
|
10305
|
-
* // "kind": "my_kind",
|
|
10306
|
-
* // "nextPageToken": "my_nextPageToken"
|
|
10307
|
-
* // }
|
|
10308
|
-
* }
|
|
10309
|
-
*
|
|
10310
|
-
* main().catch(e => {
|
|
10311
|
-
* console.error(e);
|
|
10312
|
-
* throw e;
|
|
10313
|
-
* });
|
|
10314
|
-
*
|
|
10315
|
-
* ```
|
|
10316
6535
|
*
|
|
10317
6536
|
* @param params - Parameters for request
|
|
10318
6537
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10399,81 +6618,6 @@ export namespace storage_v1 {
|
|
|
10399
6618
|
|
|
10400
6619
|
/**
|
|
10401
6620
|
* Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.
|
|
10402
|
-
* @example
|
|
10403
|
-
* ```js
|
|
10404
|
-
* // Before running the sample:
|
|
10405
|
-
* // - Enable the API at:
|
|
10406
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
10407
|
-
* // - Login into gcloud by running:
|
|
10408
|
-
* // `$ gcloud auth application-default login`
|
|
10409
|
-
* // - Install the npm module by running:
|
|
10410
|
-
* // `$ npm install googleapis`
|
|
10411
|
-
*
|
|
10412
|
-
* const {google} = require('googleapis');
|
|
10413
|
-
* const storage = google.storage('v1');
|
|
10414
|
-
*
|
|
10415
|
-
* async function main() {
|
|
10416
|
-
* const auth = new google.auth.GoogleAuth({
|
|
10417
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10418
|
-
* scopes: [
|
|
10419
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
10420
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
10421
|
-
* ],
|
|
10422
|
-
* });
|
|
10423
|
-
*
|
|
10424
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
10425
|
-
* const authClient = await auth.getClient();
|
|
10426
|
-
* google.options({auth: authClient});
|
|
10427
|
-
*
|
|
10428
|
-
* // Do the magic
|
|
10429
|
-
* const res = await storage.projects.hmacKeys.update({
|
|
10430
|
-
* // Name of the HMAC key being updated.
|
|
10431
|
-
* accessId: 'placeholder-value',
|
|
10432
|
-
* // Project ID owning the service account of the updated key.
|
|
10433
|
-
* projectId: 'placeholder-value',
|
|
10434
|
-
* // The project to be billed for this request.
|
|
10435
|
-
* userProject: 'placeholder-value',
|
|
10436
|
-
*
|
|
10437
|
-
* // Request body metadata
|
|
10438
|
-
* requestBody: {
|
|
10439
|
-
* // request body parameters
|
|
10440
|
-
* // {
|
|
10441
|
-
* // "accessId": "my_accessId",
|
|
10442
|
-
* // "etag": "my_etag",
|
|
10443
|
-
* // "id": "my_id",
|
|
10444
|
-
* // "kind": "my_kind",
|
|
10445
|
-
* // "projectId": "my_projectId",
|
|
10446
|
-
* // "selfLink": "my_selfLink",
|
|
10447
|
-
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
10448
|
-
* // "state": "my_state",
|
|
10449
|
-
* // "timeCreated": "my_timeCreated",
|
|
10450
|
-
* // "updated": "my_updated"
|
|
10451
|
-
* // }
|
|
10452
|
-
* },
|
|
10453
|
-
* });
|
|
10454
|
-
* console.log(res.data);
|
|
10455
|
-
*
|
|
10456
|
-
* // Example response
|
|
10457
|
-
* // {
|
|
10458
|
-
* // "accessId": "my_accessId",
|
|
10459
|
-
* // "etag": "my_etag",
|
|
10460
|
-
* // "id": "my_id",
|
|
10461
|
-
* // "kind": "my_kind",
|
|
10462
|
-
* // "projectId": "my_projectId",
|
|
10463
|
-
* // "selfLink": "my_selfLink",
|
|
10464
|
-
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
10465
|
-
* // "state": "my_state",
|
|
10466
|
-
* // "timeCreated": "my_timeCreated",
|
|
10467
|
-
* // "updated": "my_updated"
|
|
10468
|
-
* // }
|
|
10469
|
-
* }
|
|
10470
|
-
*
|
|
10471
|
-
* main().catch(e => {
|
|
10472
|
-
* console.error(e);
|
|
10473
|
-
* throw e;
|
|
10474
|
-
* });
|
|
10475
|
-
*
|
|
10476
|
-
* ```
|
|
10477
6621
|
*
|
|
10478
6622
|
* @param params - Parameters for request
|
|
10479
6623
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -10660,57 +6804,6 @@ export namespace storage_v1 {
|
|
|
10660
6804
|
|
|
10661
6805
|
/**
|
|
10662
6806
|
* Get the email address of this project's Google Cloud Storage service account.
|
|
10663
|
-
* @example
|
|
10664
|
-
* ```js
|
|
10665
|
-
* // Before running the sample:
|
|
10666
|
-
* // - Enable the API at:
|
|
10667
|
-
* // https://console.developers.google.com/apis/api/storage.googleapis.com
|
|
10668
|
-
* // - Login into gcloud by running:
|
|
10669
|
-
* // `$ gcloud auth application-default login`
|
|
10670
|
-
* // - Install the npm module by running:
|
|
10671
|
-
* // `$ npm install googleapis`
|
|
10672
|
-
*
|
|
10673
|
-
* const {google} = require('googleapis');
|
|
10674
|
-
* const storage = google.storage('v1');
|
|
10675
|
-
*
|
|
10676
|
-
* async function main() {
|
|
10677
|
-
* const auth = new google.auth.GoogleAuth({
|
|
10678
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
10679
|
-
* scopes: [
|
|
10680
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
10681
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
10682
|
-
* 'https://www.googleapis.com/auth/devstorage.full_control',
|
|
10683
|
-
* 'https://www.googleapis.com/auth/devstorage.read_only',
|
|
10684
|
-
* 'https://www.googleapis.com/auth/devstorage.read_write',
|
|
10685
|
-
* ],
|
|
10686
|
-
* });
|
|
10687
|
-
*
|
|
10688
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
10689
|
-
* const authClient = await auth.getClient();
|
|
10690
|
-
* google.options({auth: authClient});
|
|
10691
|
-
*
|
|
10692
|
-
* // Do the magic
|
|
10693
|
-
* const res = await storage.projects.serviceAccount.get({
|
|
10694
|
-
* // Project ID
|
|
10695
|
-
* projectId: 'placeholder-value',
|
|
10696
|
-
* // The project to be billed for this request.
|
|
10697
|
-
* userProject: 'placeholder-value',
|
|
10698
|
-
* });
|
|
10699
|
-
* console.log(res.data);
|
|
10700
|
-
*
|
|
10701
|
-
* // Example response
|
|
10702
|
-
* // {
|
|
10703
|
-
* // "email_address": "my_email_address",
|
|
10704
|
-
* // "kind": "my_kind"
|
|
10705
|
-
* // }
|
|
10706
|
-
* }
|
|
10707
|
-
*
|
|
10708
|
-
* main().catch(e => {
|
|
10709
|
-
* console.error(e);
|
|
10710
|
-
* throw e;
|
|
10711
|
-
* });
|
|
10712
|
-
*
|
|
10713
|
-
* ```
|
|
10714
6807
|
*
|
|
10715
6808
|
* @param params - Parameters for request
|
|
10716
6809
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|