@googleapis/storagebatchoperations 1.0.1 → 2.0.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 +33 -0
- package/README.md +9 -0
- package/build/v1.d.ts +594 -0
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +594 -0
package/v1.ts
CHANGED
|
@@ -537,6 +537,56 @@ export namespace storagebatchoperations_v1 {
|
|
|
537
537
|
|
|
538
538
|
/**
|
|
539
539
|
* Gets information about a location.
|
|
540
|
+
* @example
|
|
541
|
+
* ```js
|
|
542
|
+
* // Before running the sample:
|
|
543
|
+
* // - Enable the API at:
|
|
544
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
545
|
+
* // - Login into gcloud by running:
|
|
546
|
+
* // ```sh
|
|
547
|
+
* // $ gcloud auth application-default login
|
|
548
|
+
* // ```
|
|
549
|
+
* // - Install the npm module by running:
|
|
550
|
+
* // ```sh
|
|
551
|
+
* // $ npm install googleapis
|
|
552
|
+
* // ```
|
|
553
|
+
*
|
|
554
|
+
* const {google} = require('googleapis');
|
|
555
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
556
|
+
*
|
|
557
|
+
* async function main() {
|
|
558
|
+
* const auth = new google.auth.GoogleAuth({
|
|
559
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
560
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
561
|
+
* });
|
|
562
|
+
*
|
|
563
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
564
|
+
* const authClient = await auth.getClient();
|
|
565
|
+
* google.options({auth: authClient});
|
|
566
|
+
*
|
|
567
|
+
* // Do the magic
|
|
568
|
+
* const res = await storagebatchoperations.projects.locations.get({
|
|
569
|
+
* // Resource name for the location.
|
|
570
|
+
* name: 'projects/my-project/locations/my-location',
|
|
571
|
+
* });
|
|
572
|
+
* console.log(res.data);
|
|
573
|
+
*
|
|
574
|
+
* // Example response
|
|
575
|
+
* // {
|
|
576
|
+
* // "displayName": "my_displayName",
|
|
577
|
+
* // "labels": {},
|
|
578
|
+
* // "locationId": "my_locationId",
|
|
579
|
+
* // "metadata": {},
|
|
580
|
+
* // "name": "my_name"
|
|
581
|
+
* // }
|
|
582
|
+
* }
|
|
583
|
+
*
|
|
584
|
+
* main().catch(e => {
|
|
585
|
+
* console.error(e);
|
|
586
|
+
* throw e;
|
|
587
|
+
* });
|
|
588
|
+
*
|
|
589
|
+
* ```
|
|
540
590
|
*
|
|
541
591
|
* @param params - Parameters for request
|
|
542
592
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -626,6 +676,61 @@ export namespace storagebatchoperations_v1 {
|
|
|
626
676
|
|
|
627
677
|
/**
|
|
628
678
|
* Lists information about the supported locations for this service.
|
|
679
|
+
* @example
|
|
680
|
+
* ```js
|
|
681
|
+
* // Before running the sample:
|
|
682
|
+
* // - Enable the API at:
|
|
683
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
684
|
+
* // - Login into gcloud by running:
|
|
685
|
+
* // ```sh
|
|
686
|
+
* // $ gcloud auth application-default login
|
|
687
|
+
* // ```
|
|
688
|
+
* // - Install the npm module by running:
|
|
689
|
+
* // ```sh
|
|
690
|
+
* // $ npm install googleapis
|
|
691
|
+
* // ```
|
|
692
|
+
*
|
|
693
|
+
* const {google} = require('googleapis');
|
|
694
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
695
|
+
*
|
|
696
|
+
* async function main() {
|
|
697
|
+
* const auth = new google.auth.GoogleAuth({
|
|
698
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
699
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
700
|
+
* });
|
|
701
|
+
*
|
|
702
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
703
|
+
* const authClient = await auth.getClient();
|
|
704
|
+
* google.options({auth: authClient});
|
|
705
|
+
*
|
|
706
|
+
* // Do the magic
|
|
707
|
+
* const res = await storagebatchoperations.projects.locations.list({
|
|
708
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
709
|
+
* extraLocationTypes: 'placeholder-value',
|
|
710
|
+
* // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
|
711
|
+
* filter: 'placeholder-value',
|
|
712
|
+
* // The resource that owns the locations collection, if applicable.
|
|
713
|
+
* name: 'projects/my-project',
|
|
714
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
715
|
+
* pageSize: 'placeholder-value',
|
|
716
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
717
|
+
* pageToken: 'placeholder-value',
|
|
718
|
+
* });
|
|
719
|
+
* console.log(res.data);
|
|
720
|
+
*
|
|
721
|
+
* // Example response
|
|
722
|
+
* // {
|
|
723
|
+
* // "locations": [],
|
|
724
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
725
|
+
* // }
|
|
726
|
+
* }
|
|
727
|
+
*
|
|
728
|
+
* main().catch(e => {
|
|
729
|
+
* console.error(e);
|
|
730
|
+
* throw e;
|
|
731
|
+
* });
|
|
732
|
+
*
|
|
733
|
+
* ```
|
|
629
734
|
*
|
|
630
735
|
* @param params - Parameters for request
|
|
631
736
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -758,6 +863,58 @@ export namespace storagebatchoperations_v1 {
|
|
|
758
863
|
|
|
759
864
|
/**
|
|
760
865
|
* Cancels a batch job.
|
|
866
|
+
* @example
|
|
867
|
+
* ```js
|
|
868
|
+
* // Before running the sample:
|
|
869
|
+
* // - Enable the API at:
|
|
870
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
871
|
+
* // - Login into gcloud by running:
|
|
872
|
+
* // ```sh
|
|
873
|
+
* // $ gcloud auth application-default login
|
|
874
|
+
* // ```
|
|
875
|
+
* // - Install the npm module by running:
|
|
876
|
+
* // ```sh
|
|
877
|
+
* // $ npm install googleapis
|
|
878
|
+
* // ```
|
|
879
|
+
*
|
|
880
|
+
* const {google} = require('googleapis');
|
|
881
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
882
|
+
*
|
|
883
|
+
* async function main() {
|
|
884
|
+
* const auth = new google.auth.GoogleAuth({
|
|
885
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
886
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
887
|
+
* });
|
|
888
|
+
*
|
|
889
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
890
|
+
* const authClient = await auth.getClient();
|
|
891
|
+
* google.options({auth: authClient});
|
|
892
|
+
*
|
|
893
|
+
* // Do the magic
|
|
894
|
+
* const res = await storagebatchoperations.projects.locations.jobs.cancel({
|
|
895
|
+
* // Required. The `name` of the job to cancel. Format: projects/{project_id\}/locations/global/jobs/{job_id\}.
|
|
896
|
+
* name: 'projects/my-project/locations/my-location/jobs/my-job',
|
|
897
|
+
*
|
|
898
|
+
* // Request body metadata
|
|
899
|
+
* requestBody: {
|
|
900
|
+
* // request body parameters
|
|
901
|
+
* // {
|
|
902
|
+
* // "requestId": "my_requestId"
|
|
903
|
+
* // }
|
|
904
|
+
* },
|
|
905
|
+
* });
|
|
906
|
+
* console.log(res.data);
|
|
907
|
+
*
|
|
908
|
+
* // Example response
|
|
909
|
+
* // {}
|
|
910
|
+
* }
|
|
911
|
+
*
|
|
912
|
+
* main().catch(e => {
|
|
913
|
+
* console.error(e);
|
|
914
|
+
* throw e;
|
|
915
|
+
* });
|
|
916
|
+
*
|
|
917
|
+
* ```
|
|
761
918
|
*
|
|
762
919
|
* @param params - Parameters for request
|
|
763
920
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -847,6 +1004,81 @@ export namespace storagebatchoperations_v1 {
|
|
|
847
1004
|
|
|
848
1005
|
/**
|
|
849
1006
|
* Creates a batch job.
|
|
1007
|
+
* @example
|
|
1008
|
+
* ```js
|
|
1009
|
+
* // Before running the sample:
|
|
1010
|
+
* // - Enable the API at:
|
|
1011
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1012
|
+
* // - Login into gcloud by running:
|
|
1013
|
+
* // ```sh
|
|
1014
|
+
* // $ gcloud auth application-default login
|
|
1015
|
+
* // ```
|
|
1016
|
+
* // - Install the npm module by running:
|
|
1017
|
+
* // ```sh
|
|
1018
|
+
* // $ npm install googleapis
|
|
1019
|
+
* // ```
|
|
1020
|
+
*
|
|
1021
|
+
* const {google} = require('googleapis');
|
|
1022
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1023
|
+
*
|
|
1024
|
+
* async function main() {
|
|
1025
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1026
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1027
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1028
|
+
* });
|
|
1029
|
+
*
|
|
1030
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1031
|
+
* const authClient = await auth.getClient();
|
|
1032
|
+
* google.options({auth: authClient});
|
|
1033
|
+
*
|
|
1034
|
+
* // Do the magic
|
|
1035
|
+
* const res = await storagebatchoperations.projects.locations.jobs.create({
|
|
1036
|
+
* // Required. The optional `job_id` for this Job . If not specified, an id is generated. `job_id` should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.
|
|
1037
|
+
* jobId: 'placeholder-value',
|
|
1038
|
+
* // Required. Value for parent.
|
|
1039
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1040
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID in case you need to retry your request. Requests with same `request_id` will be ignored for at least 60 minutes since the first request. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
1041
|
+
* requestId: 'placeholder-value',
|
|
1042
|
+
*
|
|
1043
|
+
* // Request body metadata
|
|
1044
|
+
* requestBody: {
|
|
1045
|
+
* // request body parameters
|
|
1046
|
+
* // {
|
|
1047
|
+
* // "bucketList": {},
|
|
1048
|
+
* // "completeTime": "my_completeTime",
|
|
1049
|
+
* // "counters": {},
|
|
1050
|
+
* // "createTime": "my_createTime",
|
|
1051
|
+
* // "deleteObject": {},
|
|
1052
|
+
* // "description": "my_description",
|
|
1053
|
+
* // "errorSummaries": [],
|
|
1054
|
+
* // "loggingConfig": {},
|
|
1055
|
+
* // "name": "my_name",
|
|
1056
|
+
* // "putMetadata": {},
|
|
1057
|
+
* // "putObjectHold": {},
|
|
1058
|
+
* // "rewriteObject": {},
|
|
1059
|
+
* // "scheduleTime": "my_scheduleTime",
|
|
1060
|
+
* // "state": "my_state"
|
|
1061
|
+
* // }
|
|
1062
|
+
* },
|
|
1063
|
+
* });
|
|
1064
|
+
* console.log(res.data);
|
|
1065
|
+
*
|
|
1066
|
+
* // Example response
|
|
1067
|
+
* // {
|
|
1068
|
+
* // "done": false,
|
|
1069
|
+
* // "error": {},
|
|
1070
|
+
* // "metadata": {},
|
|
1071
|
+
* // "name": "my_name",
|
|
1072
|
+
* // "response": {}
|
|
1073
|
+
* // }
|
|
1074
|
+
* }
|
|
1075
|
+
*
|
|
1076
|
+
* main().catch(e => {
|
|
1077
|
+
* console.error(e);
|
|
1078
|
+
* throw e;
|
|
1079
|
+
* });
|
|
1080
|
+
*
|
|
1081
|
+
* ```
|
|
850
1082
|
*
|
|
851
1083
|
* @param params - Parameters for request
|
|
852
1084
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -936,6 +1168,52 @@ export namespace storagebatchoperations_v1 {
|
|
|
936
1168
|
|
|
937
1169
|
/**
|
|
938
1170
|
* Deletes a batch job.
|
|
1171
|
+
* @example
|
|
1172
|
+
* ```js
|
|
1173
|
+
* // Before running the sample:
|
|
1174
|
+
* // - Enable the API at:
|
|
1175
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1176
|
+
* // - Login into gcloud by running:
|
|
1177
|
+
* // ```sh
|
|
1178
|
+
* // $ gcloud auth application-default login
|
|
1179
|
+
* // ```
|
|
1180
|
+
* // - Install the npm module by running:
|
|
1181
|
+
* // ```sh
|
|
1182
|
+
* // $ npm install googleapis
|
|
1183
|
+
* // ```
|
|
1184
|
+
*
|
|
1185
|
+
* const {google} = require('googleapis');
|
|
1186
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1187
|
+
*
|
|
1188
|
+
* async function main() {
|
|
1189
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1190
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1191
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1192
|
+
* });
|
|
1193
|
+
*
|
|
1194
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1195
|
+
* const authClient = await auth.getClient();
|
|
1196
|
+
* google.options({auth: authClient});
|
|
1197
|
+
*
|
|
1198
|
+
* // Do the magic
|
|
1199
|
+
* const res = await storagebatchoperations.projects.locations.jobs.delete({
|
|
1200
|
+
* // Required. The `name` of the job to delete. Format: projects/{project_id\}/locations/global/jobs/{job_id\} .
|
|
1201
|
+
* name: 'projects/my-project/locations/my-location/jobs/my-job',
|
|
1202
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID in case you need to retry your request. Requests with same `request_id` will be ignored for at least 60 minutes since the first request. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
1203
|
+
* requestId: 'placeholder-value',
|
|
1204
|
+
* });
|
|
1205
|
+
* console.log(res.data);
|
|
1206
|
+
*
|
|
1207
|
+
* // Example response
|
|
1208
|
+
* // {}
|
|
1209
|
+
* }
|
|
1210
|
+
*
|
|
1211
|
+
* main().catch(e => {
|
|
1212
|
+
* console.error(e);
|
|
1213
|
+
* throw e;
|
|
1214
|
+
* });
|
|
1215
|
+
*
|
|
1216
|
+
* ```
|
|
939
1217
|
*
|
|
940
1218
|
* @param params - Parameters for request
|
|
941
1219
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1025,6 +1303,65 @@ export namespace storagebatchoperations_v1 {
|
|
|
1025
1303
|
|
|
1026
1304
|
/**
|
|
1027
1305
|
* Gets a batch job.
|
|
1306
|
+
* @example
|
|
1307
|
+
* ```js
|
|
1308
|
+
* // Before running the sample:
|
|
1309
|
+
* // - Enable the API at:
|
|
1310
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1311
|
+
* // - Login into gcloud by running:
|
|
1312
|
+
* // ```sh
|
|
1313
|
+
* // $ gcloud auth application-default login
|
|
1314
|
+
* // ```
|
|
1315
|
+
* // - Install the npm module by running:
|
|
1316
|
+
* // ```sh
|
|
1317
|
+
* // $ npm install googleapis
|
|
1318
|
+
* // ```
|
|
1319
|
+
*
|
|
1320
|
+
* const {google} = require('googleapis');
|
|
1321
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1322
|
+
*
|
|
1323
|
+
* async function main() {
|
|
1324
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1325
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1326
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1327
|
+
* });
|
|
1328
|
+
*
|
|
1329
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1330
|
+
* const authClient = await auth.getClient();
|
|
1331
|
+
* google.options({auth: authClient});
|
|
1332
|
+
*
|
|
1333
|
+
* // Do the magic
|
|
1334
|
+
* const res = await storagebatchoperations.projects.locations.jobs.get({
|
|
1335
|
+
* // Required. `name` of the job to retrieve. Format: projects/{project_id\}/locations/global/jobs/{job_id\} .
|
|
1336
|
+
* name: 'projects/my-project/locations/my-location/jobs/my-job',
|
|
1337
|
+
* });
|
|
1338
|
+
* console.log(res.data);
|
|
1339
|
+
*
|
|
1340
|
+
* // Example response
|
|
1341
|
+
* // {
|
|
1342
|
+
* // "bucketList": {},
|
|
1343
|
+
* // "completeTime": "my_completeTime",
|
|
1344
|
+
* // "counters": {},
|
|
1345
|
+
* // "createTime": "my_createTime",
|
|
1346
|
+
* // "deleteObject": {},
|
|
1347
|
+
* // "description": "my_description",
|
|
1348
|
+
* // "errorSummaries": [],
|
|
1349
|
+
* // "loggingConfig": {},
|
|
1350
|
+
* // "name": "my_name",
|
|
1351
|
+
* // "putMetadata": {},
|
|
1352
|
+
* // "putObjectHold": {},
|
|
1353
|
+
* // "rewriteObject": {},
|
|
1354
|
+
* // "scheduleTime": "my_scheduleTime",
|
|
1355
|
+
* // "state": "my_state"
|
|
1356
|
+
* // }
|
|
1357
|
+
* }
|
|
1358
|
+
*
|
|
1359
|
+
* main().catch(e => {
|
|
1360
|
+
* console.error(e);
|
|
1361
|
+
* throw e;
|
|
1362
|
+
* });
|
|
1363
|
+
*
|
|
1364
|
+
* ```
|
|
1028
1365
|
*
|
|
1029
1366
|
* @param params - Parameters for request
|
|
1030
1367
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1114,6 +1451,62 @@ export namespace storagebatchoperations_v1 {
|
|
|
1114
1451
|
|
|
1115
1452
|
/**
|
|
1116
1453
|
* Lists Jobs in a given project.
|
|
1454
|
+
* @example
|
|
1455
|
+
* ```js
|
|
1456
|
+
* // Before running the sample:
|
|
1457
|
+
* // - Enable the API at:
|
|
1458
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1459
|
+
* // - Login into gcloud by running:
|
|
1460
|
+
* // ```sh
|
|
1461
|
+
* // $ gcloud auth application-default login
|
|
1462
|
+
* // ```
|
|
1463
|
+
* // - Install the npm module by running:
|
|
1464
|
+
* // ```sh
|
|
1465
|
+
* // $ npm install googleapis
|
|
1466
|
+
* // ```
|
|
1467
|
+
*
|
|
1468
|
+
* const {google} = require('googleapis');
|
|
1469
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1470
|
+
*
|
|
1471
|
+
* async function main() {
|
|
1472
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1473
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1474
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1475
|
+
* });
|
|
1476
|
+
*
|
|
1477
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1478
|
+
* const authClient = await auth.getClient();
|
|
1479
|
+
* google.options({auth: authClient});
|
|
1480
|
+
*
|
|
1481
|
+
* // Do the magic
|
|
1482
|
+
* const res = await storagebatchoperations.projects.locations.jobs.list({
|
|
1483
|
+
* // Optional. Filters results as defined by https://google.aip.dev/160.
|
|
1484
|
+
* filter: 'placeholder-value',
|
|
1485
|
+
* // Optional. Field to sort by. Supported fields are name, create_time.
|
|
1486
|
+
* orderBy: 'placeholder-value',
|
|
1487
|
+
* // Optional. The list page size. default page size is 100.
|
|
1488
|
+
* pageSize: 'placeholder-value',
|
|
1489
|
+
* // Optional. The list page token.
|
|
1490
|
+
* pageToken: 'placeholder-value',
|
|
1491
|
+
* // Required. Format: projects/{project_id\}/locations/global.
|
|
1492
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1493
|
+
* });
|
|
1494
|
+
* console.log(res.data);
|
|
1495
|
+
*
|
|
1496
|
+
* // Example response
|
|
1497
|
+
* // {
|
|
1498
|
+
* // "jobs": [],
|
|
1499
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1500
|
+
* // "unreachable": []
|
|
1501
|
+
* // }
|
|
1502
|
+
* }
|
|
1503
|
+
*
|
|
1504
|
+
* main().catch(e => {
|
|
1505
|
+
* console.error(e);
|
|
1506
|
+
* throw e;
|
|
1507
|
+
* });
|
|
1508
|
+
*
|
|
1509
|
+
* ```
|
|
1117
1510
|
*
|
|
1118
1511
|
* @param params - Parameters for request
|
|
1119
1512
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1284,6 +1677,58 @@ export namespace storagebatchoperations_v1 {
|
|
|
1284
1677
|
|
|
1285
1678
|
/**
|
|
1286
1679
|
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
|
|
1680
|
+
* @example
|
|
1681
|
+
* ```js
|
|
1682
|
+
* // Before running the sample:
|
|
1683
|
+
* // - Enable the API at:
|
|
1684
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1685
|
+
* // - Login into gcloud by running:
|
|
1686
|
+
* // ```sh
|
|
1687
|
+
* // $ gcloud auth application-default login
|
|
1688
|
+
* // ```
|
|
1689
|
+
* // - Install the npm module by running:
|
|
1690
|
+
* // ```sh
|
|
1691
|
+
* // $ npm install googleapis
|
|
1692
|
+
* // ```
|
|
1693
|
+
*
|
|
1694
|
+
* const {google} = require('googleapis');
|
|
1695
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1696
|
+
*
|
|
1697
|
+
* async function main() {
|
|
1698
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1699
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1700
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1701
|
+
* });
|
|
1702
|
+
*
|
|
1703
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1704
|
+
* const authClient = await auth.getClient();
|
|
1705
|
+
* google.options({auth: authClient});
|
|
1706
|
+
*
|
|
1707
|
+
* // Do the magic
|
|
1708
|
+
* const res = await storagebatchoperations.projects.locations.operations.cancel(
|
|
1709
|
+
* {
|
|
1710
|
+
* // The name of the operation resource to be cancelled.
|
|
1711
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1712
|
+
*
|
|
1713
|
+
* // Request body metadata
|
|
1714
|
+
* requestBody: {
|
|
1715
|
+
* // request body parameters
|
|
1716
|
+
* // {}
|
|
1717
|
+
* },
|
|
1718
|
+
* },
|
|
1719
|
+
* );
|
|
1720
|
+
* console.log(res.data);
|
|
1721
|
+
*
|
|
1722
|
+
* // Example response
|
|
1723
|
+
* // {}
|
|
1724
|
+
* }
|
|
1725
|
+
*
|
|
1726
|
+
* main().catch(e => {
|
|
1727
|
+
* console.error(e);
|
|
1728
|
+
* throw e;
|
|
1729
|
+
* });
|
|
1730
|
+
*
|
|
1731
|
+
* ```
|
|
1287
1732
|
*
|
|
1288
1733
|
* @param params - Parameters for request
|
|
1289
1734
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1373,6 +1818,52 @@ export namespace storagebatchoperations_v1 {
|
|
|
1373
1818
|
|
|
1374
1819
|
/**
|
|
1375
1820
|
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
1821
|
+
* @example
|
|
1822
|
+
* ```js
|
|
1823
|
+
* // Before running the sample:
|
|
1824
|
+
* // - Enable the API at:
|
|
1825
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1826
|
+
* // - Login into gcloud by running:
|
|
1827
|
+
* // ```sh
|
|
1828
|
+
* // $ gcloud auth application-default login
|
|
1829
|
+
* // ```
|
|
1830
|
+
* // - Install the npm module by running:
|
|
1831
|
+
* // ```sh
|
|
1832
|
+
* // $ npm install googleapis
|
|
1833
|
+
* // ```
|
|
1834
|
+
*
|
|
1835
|
+
* const {google} = require('googleapis');
|
|
1836
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1837
|
+
*
|
|
1838
|
+
* async function main() {
|
|
1839
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1840
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1841
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1842
|
+
* });
|
|
1843
|
+
*
|
|
1844
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1845
|
+
* const authClient = await auth.getClient();
|
|
1846
|
+
* google.options({auth: authClient});
|
|
1847
|
+
*
|
|
1848
|
+
* // Do the magic
|
|
1849
|
+
* const res = await storagebatchoperations.projects.locations.operations.delete(
|
|
1850
|
+
* {
|
|
1851
|
+
* // The name of the operation resource to be deleted.
|
|
1852
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1853
|
+
* },
|
|
1854
|
+
* );
|
|
1855
|
+
* console.log(res.data);
|
|
1856
|
+
*
|
|
1857
|
+
* // Example response
|
|
1858
|
+
* // {}
|
|
1859
|
+
* }
|
|
1860
|
+
*
|
|
1861
|
+
* main().catch(e => {
|
|
1862
|
+
* console.error(e);
|
|
1863
|
+
* throw e;
|
|
1864
|
+
* });
|
|
1865
|
+
*
|
|
1866
|
+
* ```
|
|
1376
1867
|
*
|
|
1377
1868
|
* @param params - Parameters for request
|
|
1378
1869
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1462,6 +1953,56 @@ export namespace storagebatchoperations_v1 {
|
|
|
1462
1953
|
|
|
1463
1954
|
/**
|
|
1464
1955
|
* Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
|
|
1956
|
+
* @example
|
|
1957
|
+
* ```js
|
|
1958
|
+
* // Before running the sample:
|
|
1959
|
+
* // - Enable the API at:
|
|
1960
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1961
|
+
* // - Login into gcloud by running:
|
|
1962
|
+
* // ```sh
|
|
1963
|
+
* // $ gcloud auth application-default login
|
|
1964
|
+
* // ```
|
|
1965
|
+
* // - Install the npm module by running:
|
|
1966
|
+
* // ```sh
|
|
1967
|
+
* // $ npm install googleapis
|
|
1968
|
+
* // ```
|
|
1969
|
+
*
|
|
1970
|
+
* const {google} = require('googleapis');
|
|
1971
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1972
|
+
*
|
|
1973
|
+
* async function main() {
|
|
1974
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1975
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1976
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1977
|
+
* });
|
|
1978
|
+
*
|
|
1979
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1980
|
+
* const authClient = await auth.getClient();
|
|
1981
|
+
* google.options({auth: authClient});
|
|
1982
|
+
*
|
|
1983
|
+
* // Do the magic
|
|
1984
|
+
* const res = await storagebatchoperations.projects.locations.operations.get({
|
|
1985
|
+
* // The name of the operation resource.
|
|
1986
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1987
|
+
* });
|
|
1988
|
+
* console.log(res.data);
|
|
1989
|
+
*
|
|
1990
|
+
* // Example response
|
|
1991
|
+
* // {
|
|
1992
|
+
* // "done": false,
|
|
1993
|
+
* // "error": {},
|
|
1994
|
+
* // "metadata": {},
|
|
1995
|
+
* // "name": "my_name",
|
|
1996
|
+
* // "response": {}
|
|
1997
|
+
* // }
|
|
1998
|
+
* }
|
|
1999
|
+
*
|
|
2000
|
+
* main().catch(e => {
|
|
2001
|
+
* console.error(e);
|
|
2002
|
+
* throw e;
|
|
2003
|
+
* });
|
|
2004
|
+
*
|
|
2005
|
+
* ```
|
|
1465
2006
|
*
|
|
1466
2007
|
* @param params - Parameters for request
|
|
1467
2008
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1551,6 +2092,59 @@ export namespace storagebatchoperations_v1 {
|
|
|
1551
2092
|
|
|
1552
2093
|
/**
|
|
1553
2094
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2095
|
+
* @example
|
|
2096
|
+
* ```js
|
|
2097
|
+
* // Before running the sample:
|
|
2098
|
+
* // - Enable the API at:
|
|
2099
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
2100
|
+
* // - Login into gcloud by running:
|
|
2101
|
+
* // ```sh
|
|
2102
|
+
* // $ gcloud auth application-default login
|
|
2103
|
+
* // ```
|
|
2104
|
+
* // - Install the npm module by running:
|
|
2105
|
+
* // ```sh
|
|
2106
|
+
* // $ npm install googleapis
|
|
2107
|
+
* // ```
|
|
2108
|
+
*
|
|
2109
|
+
* const {google} = require('googleapis');
|
|
2110
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
2111
|
+
*
|
|
2112
|
+
* async function main() {
|
|
2113
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2114
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2115
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2116
|
+
* });
|
|
2117
|
+
*
|
|
2118
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2119
|
+
* const authClient = await auth.getClient();
|
|
2120
|
+
* google.options({auth: authClient});
|
|
2121
|
+
*
|
|
2122
|
+
* // Do the magic
|
|
2123
|
+
* const res = await storagebatchoperations.projects.locations.operations.list({
|
|
2124
|
+
* // The standard list filter.
|
|
2125
|
+
* filter: 'placeholder-value',
|
|
2126
|
+
* // The name of the operation's parent resource.
|
|
2127
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2128
|
+
* // The standard list page size.
|
|
2129
|
+
* pageSize: 'placeholder-value',
|
|
2130
|
+
* // The standard list page token.
|
|
2131
|
+
* pageToken: 'placeholder-value',
|
|
2132
|
+
* });
|
|
2133
|
+
* console.log(res.data);
|
|
2134
|
+
*
|
|
2135
|
+
* // Example response
|
|
2136
|
+
* // {
|
|
2137
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2138
|
+
* // "operations": []
|
|
2139
|
+
* // }
|
|
2140
|
+
* }
|
|
2141
|
+
*
|
|
2142
|
+
* main().catch(e => {
|
|
2143
|
+
* console.error(e);
|
|
2144
|
+
* throw e;
|
|
2145
|
+
* });
|
|
2146
|
+
*
|
|
2147
|
+
* ```
|
|
1554
2148
|
*
|
|
1555
2149
|
* @param params - Parameters for request
|
|
1556
2150
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|