@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/build/v1.d.ts
CHANGED
|
@@ -487,6 +487,56 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
487
487
|
constructor(context: APIRequestContext);
|
|
488
488
|
/**
|
|
489
489
|
* Gets information about a location.
|
|
490
|
+
* @example
|
|
491
|
+
* ```js
|
|
492
|
+
* // Before running the sample:
|
|
493
|
+
* // - Enable the API at:
|
|
494
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
495
|
+
* // - Login into gcloud by running:
|
|
496
|
+
* // ```sh
|
|
497
|
+
* // $ gcloud auth application-default login
|
|
498
|
+
* // ```
|
|
499
|
+
* // - Install the npm module by running:
|
|
500
|
+
* // ```sh
|
|
501
|
+
* // $ npm install googleapis
|
|
502
|
+
* // ```
|
|
503
|
+
*
|
|
504
|
+
* const {google} = require('googleapis');
|
|
505
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
506
|
+
*
|
|
507
|
+
* async function main() {
|
|
508
|
+
* const auth = new google.auth.GoogleAuth({
|
|
509
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
510
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
511
|
+
* });
|
|
512
|
+
*
|
|
513
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
514
|
+
* const authClient = await auth.getClient();
|
|
515
|
+
* google.options({auth: authClient});
|
|
516
|
+
*
|
|
517
|
+
* // Do the magic
|
|
518
|
+
* const res = await storagebatchoperations.projects.locations.get({
|
|
519
|
+
* // Resource name for the location.
|
|
520
|
+
* name: 'projects/my-project/locations/my-location',
|
|
521
|
+
* });
|
|
522
|
+
* console.log(res.data);
|
|
523
|
+
*
|
|
524
|
+
* // Example response
|
|
525
|
+
* // {
|
|
526
|
+
* // "displayName": "my_displayName",
|
|
527
|
+
* // "labels": {},
|
|
528
|
+
* // "locationId": "my_locationId",
|
|
529
|
+
* // "metadata": {},
|
|
530
|
+
* // "name": "my_name"
|
|
531
|
+
* // }
|
|
532
|
+
* }
|
|
533
|
+
*
|
|
534
|
+
* main().catch(e => {
|
|
535
|
+
* console.error(e);
|
|
536
|
+
* throw e;
|
|
537
|
+
* });
|
|
538
|
+
*
|
|
539
|
+
* ```
|
|
490
540
|
*
|
|
491
541
|
* @param params - Parameters for request
|
|
492
542
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -501,6 +551,61 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
501
551
|
get(callback: BodyResponseCallback<Schema$Location>): void;
|
|
502
552
|
/**
|
|
503
553
|
* Lists information about the supported locations for this service.
|
|
554
|
+
* @example
|
|
555
|
+
* ```js
|
|
556
|
+
* // Before running the sample:
|
|
557
|
+
* // - Enable the API at:
|
|
558
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
559
|
+
* // - Login into gcloud by running:
|
|
560
|
+
* // ```sh
|
|
561
|
+
* // $ gcloud auth application-default login
|
|
562
|
+
* // ```
|
|
563
|
+
* // - Install the npm module by running:
|
|
564
|
+
* // ```sh
|
|
565
|
+
* // $ npm install googleapis
|
|
566
|
+
* // ```
|
|
567
|
+
*
|
|
568
|
+
* const {google} = require('googleapis');
|
|
569
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
570
|
+
*
|
|
571
|
+
* async function main() {
|
|
572
|
+
* const auth = new google.auth.GoogleAuth({
|
|
573
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
574
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
575
|
+
* });
|
|
576
|
+
*
|
|
577
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
578
|
+
* const authClient = await auth.getClient();
|
|
579
|
+
* google.options({auth: authClient});
|
|
580
|
+
*
|
|
581
|
+
* // Do the magic
|
|
582
|
+
* const res = await storagebatchoperations.projects.locations.list({
|
|
583
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
584
|
+
* extraLocationTypes: 'placeholder-value',
|
|
585
|
+
* // 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).
|
|
586
|
+
* filter: 'placeholder-value',
|
|
587
|
+
* // The resource that owns the locations collection, if applicable.
|
|
588
|
+
* name: 'projects/my-project',
|
|
589
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
590
|
+
* pageSize: 'placeholder-value',
|
|
591
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
592
|
+
* pageToken: 'placeholder-value',
|
|
593
|
+
* });
|
|
594
|
+
* console.log(res.data);
|
|
595
|
+
*
|
|
596
|
+
* // Example response
|
|
597
|
+
* // {
|
|
598
|
+
* // "locations": [],
|
|
599
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
600
|
+
* // }
|
|
601
|
+
* }
|
|
602
|
+
*
|
|
603
|
+
* main().catch(e => {
|
|
604
|
+
* console.error(e);
|
|
605
|
+
* throw e;
|
|
606
|
+
* });
|
|
607
|
+
*
|
|
608
|
+
* ```
|
|
504
609
|
*
|
|
505
610
|
* @param params - Parameters for request
|
|
506
611
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -547,6 +652,58 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
547
652
|
constructor(context: APIRequestContext);
|
|
548
653
|
/**
|
|
549
654
|
* Cancels a batch job.
|
|
655
|
+
* @example
|
|
656
|
+
* ```js
|
|
657
|
+
* // Before running the sample:
|
|
658
|
+
* // - Enable the API at:
|
|
659
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
660
|
+
* // - Login into gcloud by running:
|
|
661
|
+
* // ```sh
|
|
662
|
+
* // $ gcloud auth application-default login
|
|
663
|
+
* // ```
|
|
664
|
+
* // - Install the npm module by running:
|
|
665
|
+
* // ```sh
|
|
666
|
+
* // $ npm install googleapis
|
|
667
|
+
* // ```
|
|
668
|
+
*
|
|
669
|
+
* const {google} = require('googleapis');
|
|
670
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
671
|
+
*
|
|
672
|
+
* async function main() {
|
|
673
|
+
* const auth = new google.auth.GoogleAuth({
|
|
674
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
675
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
676
|
+
* });
|
|
677
|
+
*
|
|
678
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
679
|
+
* const authClient = await auth.getClient();
|
|
680
|
+
* google.options({auth: authClient});
|
|
681
|
+
*
|
|
682
|
+
* // Do the magic
|
|
683
|
+
* const res = await storagebatchoperations.projects.locations.jobs.cancel({
|
|
684
|
+
* // Required. The `name` of the job to cancel. Format: projects/{project_id\}/locations/global/jobs/{job_id\}.
|
|
685
|
+
* name: 'projects/my-project/locations/my-location/jobs/my-job',
|
|
686
|
+
*
|
|
687
|
+
* // Request body metadata
|
|
688
|
+
* requestBody: {
|
|
689
|
+
* // request body parameters
|
|
690
|
+
* // {
|
|
691
|
+
* // "requestId": "my_requestId"
|
|
692
|
+
* // }
|
|
693
|
+
* },
|
|
694
|
+
* });
|
|
695
|
+
* console.log(res.data);
|
|
696
|
+
*
|
|
697
|
+
* // Example response
|
|
698
|
+
* // {}
|
|
699
|
+
* }
|
|
700
|
+
*
|
|
701
|
+
* main().catch(e => {
|
|
702
|
+
* console.error(e);
|
|
703
|
+
* throw e;
|
|
704
|
+
* });
|
|
705
|
+
*
|
|
706
|
+
* ```
|
|
550
707
|
*
|
|
551
708
|
* @param params - Parameters for request
|
|
552
709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -561,6 +718,81 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
561
718
|
cancel(callback: BodyResponseCallback<Schema$CancelJobResponse>): void;
|
|
562
719
|
/**
|
|
563
720
|
* Creates a batch job.
|
|
721
|
+
* @example
|
|
722
|
+
* ```js
|
|
723
|
+
* // Before running the sample:
|
|
724
|
+
* // - Enable the API at:
|
|
725
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
726
|
+
* // - Login into gcloud by running:
|
|
727
|
+
* // ```sh
|
|
728
|
+
* // $ gcloud auth application-default login
|
|
729
|
+
* // ```
|
|
730
|
+
* // - Install the npm module by running:
|
|
731
|
+
* // ```sh
|
|
732
|
+
* // $ npm install googleapis
|
|
733
|
+
* // ```
|
|
734
|
+
*
|
|
735
|
+
* const {google} = require('googleapis');
|
|
736
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
737
|
+
*
|
|
738
|
+
* async function main() {
|
|
739
|
+
* const auth = new google.auth.GoogleAuth({
|
|
740
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
741
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
742
|
+
* });
|
|
743
|
+
*
|
|
744
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
745
|
+
* const authClient = await auth.getClient();
|
|
746
|
+
* google.options({auth: authClient});
|
|
747
|
+
*
|
|
748
|
+
* // Do the magic
|
|
749
|
+
* const res = await storagebatchoperations.projects.locations.jobs.create({
|
|
750
|
+
* // 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.
|
|
751
|
+
* jobId: 'placeholder-value',
|
|
752
|
+
* // Required. Value for parent.
|
|
753
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
754
|
+
* // 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).
|
|
755
|
+
* requestId: 'placeholder-value',
|
|
756
|
+
*
|
|
757
|
+
* // Request body metadata
|
|
758
|
+
* requestBody: {
|
|
759
|
+
* // request body parameters
|
|
760
|
+
* // {
|
|
761
|
+
* // "bucketList": {},
|
|
762
|
+
* // "completeTime": "my_completeTime",
|
|
763
|
+
* // "counters": {},
|
|
764
|
+
* // "createTime": "my_createTime",
|
|
765
|
+
* // "deleteObject": {},
|
|
766
|
+
* // "description": "my_description",
|
|
767
|
+
* // "errorSummaries": [],
|
|
768
|
+
* // "loggingConfig": {},
|
|
769
|
+
* // "name": "my_name",
|
|
770
|
+
* // "putMetadata": {},
|
|
771
|
+
* // "putObjectHold": {},
|
|
772
|
+
* // "rewriteObject": {},
|
|
773
|
+
* // "scheduleTime": "my_scheduleTime",
|
|
774
|
+
* // "state": "my_state"
|
|
775
|
+
* // }
|
|
776
|
+
* },
|
|
777
|
+
* });
|
|
778
|
+
* console.log(res.data);
|
|
779
|
+
*
|
|
780
|
+
* // Example response
|
|
781
|
+
* // {
|
|
782
|
+
* // "done": false,
|
|
783
|
+
* // "error": {},
|
|
784
|
+
* // "metadata": {},
|
|
785
|
+
* // "name": "my_name",
|
|
786
|
+
* // "response": {}
|
|
787
|
+
* // }
|
|
788
|
+
* }
|
|
789
|
+
*
|
|
790
|
+
* main().catch(e => {
|
|
791
|
+
* console.error(e);
|
|
792
|
+
* throw e;
|
|
793
|
+
* });
|
|
794
|
+
*
|
|
795
|
+
* ```
|
|
564
796
|
*
|
|
565
797
|
* @param params - Parameters for request
|
|
566
798
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -575,6 +807,52 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
575
807
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
576
808
|
/**
|
|
577
809
|
* Deletes a batch job.
|
|
810
|
+
* @example
|
|
811
|
+
* ```js
|
|
812
|
+
* // Before running the sample:
|
|
813
|
+
* // - Enable the API at:
|
|
814
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
815
|
+
* // - Login into gcloud by running:
|
|
816
|
+
* // ```sh
|
|
817
|
+
* // $ gcloud auth application-default login
|
|
818
|
+
* // ```
|
|
819
|
+
* // - Install the npm module by running:
|
|
820
|
+
* // ```sh
|
|
821
|
+
* // $ npm install googleapis
|
|
822
|
+
* // ```
|
|
823
|
+
*
|
|
824
|
+
* const {google} = require('googleapis');
|
|
825
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
826
|
+
*
|
|
827
|
+
* async function main() {
|
|
828
|
+
* const auth = new google.auth.GoogleAuth({
|
|
829
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
830
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
831
|
+
* });
|
|
832
|
+
*
|
|
833
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
834
|
+
* const authClient = await auth.getClient();
|
|
835
|
+
* google.options({auth: authClient});
|
|
836
|
+
*
|
|
837
|
+
* // Do the magic
|
|
838
|
+
* const res = await storagebatchoperations.projects.locations.jobs.delete({
|
|
839
|
+
* // Required. The `name` of the job to delete. Format: projects/{project_id\}/locations/global/jobs/{job_id\} .
|
|
840
|
+
* name: 'projects/my-project/locations/my-location/jobs/my-job',
|
|
841
|
+
* // 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).
|
|
842
|
+
* requestId: 'placeholder-value',
|
|
843
|
+
* });
|
|
844
|
+
* console.log(res.data);
|
|
845
|
+
*
|
|
846
|
+
* // Example response
|
|
847
|
+
* // {}
|
|
848
|
+
* }
|
|
849
|
+
*
|
|
850
|
+
* main().catch(e => {
|
|
851
|
+
* console.error(e);
|
|
852
|
+
* throw e;
|
|
853
|
+
* });
|
|
854
|
+
*
|
|
855
|
+
* ```
|
|
578
856
|
*
|
|
579
857
|
* @param params - Parameters for request
|
|
580
858
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -589,6 +867,65 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
589
867
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
590
868
|
/**
|
|
591
869
|
* Gets a batch job.
|
|
870
|
+
* @example
|
|
871
|
+
* ```js
|
|
872
|
+
* // Before running the sample:
|
|
873
|
+
* // - Enable the API at:
|
|
874
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
875
|
+
* // - Login into gcloud by running:
|
|
876
|
+
* // ```sh
|
|
877
|
+
* // $ gcloud auth application-default login
|
|
878
|
+
* // ```
|
|
879
|
+
* // - Install the npm module by running:
|
|
880
|
+
* // ```sh
|
|
881
|
+
* // $ npm install googleapis
|
|
882
|
+
* // ```
|
|
883
|
+
*
|
|
884
|
+
* const {google} = require('googleapis');
|
|
885
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
886
|
+
*
|
|
887
|
+
* async function main() {
|
|
888
|
+
* const auth = new google.auth.GoogleAuth({
|
|
889
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
890
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
891
|
+
* });
|
|
892
|
+
*
|
|
893
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
894
|
+
* const authClient = await auth.getClient();
|
|
895
|
+
* google.options({auth: authClient});
|
|
896
|
+
*
|
|
897
|
+
* // Do the magic
|
|
898
|
+
* const res = await storagebatchoperations.projects.locations.jobs.get({
|
|
899
|
+
* // Required. `name` of the job to retrieve. Format: projects/{project_id\}/locations/global/jobs/{job_id\} .
|
|
900
|
+
* name: 'projects/my-project/locations/my-location/jobs/my-job',
|
|
901
|
+
* });
|
|
902
|
+
* console.log(res.data);
|
|
903
|
+
*
|
|
904
|
+
* // Example response
|
|
905
|
+
* // {
|
|
906
|
+
* // "bucketList": {},
|
|
907
|
+
* // "completeTime": "my_completeTime",
|
|
908
|
+
* // "counters": {},
|
|
909
|
+
* // "createTime": "my_createTime",
|
|
910
|
+
* // "deleteObject": {},
|
|
911
|
+
* // "description": "my_description",
|
|
912
|
+
* // "errorSummaries": [],
|
|
913
|
+
* // "loggingConfig": {},
|
|
914
|
+
* // "name": "my_name",
|
|
915
|
+
* // "putMetadata": {},
|
|
916
|
+
* // "putObjectHold": {},
|
|
917
|
+
* // "rewriteObject": {},
|
|
918
|
+
* // "scheduleTime": "my_scheduleTime",
|
|
919
|
+
* // "state": "my_state"
|
|
920
|
+
* // }
|
|
921
|
+
* }
|
|
922
|
+
*
|
|
923
|
+
* main().catch(e => {
|
|
924
|
+
* console.error(e);
|
|
925
|
+
* throw e;
|
|
926
|
+
* });
|
|
927
|
+
*
|
|
928
|
+
* ```
|
|
592
929
|
*
|
|
593
930
|
* @param params - Parameters for request
|
|
594
931
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -603,6 +940,62 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
603
940
|
get(callback: BodyResponseCallback<Schema$Job>): void;
|
|
604
941
|
/**
|
|
605
942
|
* Lists Jobs in a given project.
|
|
943
|
+
* @example
|
|
944
|
+
* ```js
|
|
945
|
+
* // Before running the sample:
|
|
946
|
+
* // - Enable the API at:
|
|
947
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
948
|
+
* // - Login into gcloud by running:
|
|
949
|
+
* // ```sh
|
|
950
|
+
* // $ gcloud auth application-default login
|
|
951
|
+
* // ```
|
|
952
|
+
* // - Install the npm module by running:
|
|
953
|
+
* // ```sh
|
|
954
|
+
* // $ npm install googleapis
|
|
955
|
+
* // ```
|
|
956
|
+
*
|
|
957
|
+
* const {google} = require('googleapis');
|
|
958
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
959
|
+
*
|
|
960
|
+
* async function main() {
|
|
961
|
+
* const auth = new google.auth.GoogleAuth({
|
|
962
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
963
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
964
|
+
* });
|
|
965
|
+
*
|
|
966
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
967
|
+
* const authClient = await auth.getClient();
|
|
968
|
+
* google.options({auth: authClient});
|
|
969
|
+
*
|
|
970
|
+
* // Do the magic
|
|
971
|
+
* const res = await storagebatchoperations.projects.locations.jobs.list({
|
|
972
|
+
* // Optional. Filters results as defined by https://google.aip.dev/160.
|
|
973
|
+
* filter: 'placeholder-value',
|
|
974
|
+
* // Optional. Field to sort by. Supported fields are name, create_time.
|
|
975
|
+
* orderBy: 'placeholder-value',
|
|
976
|
+
* // Optional. The list page size. default page size is 100.
|
|
977
|
+
* pageSize: 'placeholder-value',
|
|
978
|
+
* // Optional. The list page token.
|
|
979
|
+
* pageToken: 'placeholder-value',
|
|
980
|
+
* // Required. Format: projects/{project_id\}/locations/global.
|
|
981
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
982
|
+
* });
|
|
983
|
+
* console.log(res.data);
|
|
984
|
+
*
|
|
985
|
+
* // Example response
|
|
986
|
+
* // {
|
|
987
|
+
* // "jobs": [],
|
|
988
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
989
|
+
* // "unreachable": []
|
|
990
|
+
* // }
|
|
991
|
+
* }
|
|
992
|
+
*
|
|
993
|
+
* main().catch(e => {
|
|
994
|
+
* console.error(e);
|
|
995
|
+
* throw e;
|
|
996
|
+
* });
|
|
997
|
+
*
|
|
998
|
+
* ```
|
|
606
999
|
*
|
|
607
1000
|
* @param params - Parameters for request
|
|
608
1001
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -687,6 +1080,58 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
687
1080
|
constructor(context: APIRequestContext);
|
|
688
1081
|
/**
|
|
689
1082
|
* 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`.
|
|
1083
|
+
* @example
|
|
1084
|
+
* ```js
|
|
1085
|
+
* // Before running the sample:
|
|
1086
|
+
* // - Enable the API at:
|
|
1087
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1088
|
+
* // - Login into gcloud by running:
|
|
1089
|
+
* // ```sh
|
|
1090
|
+
* // $ gcloud auth application-default login
|
|
1091
|
+
* // ```
|
|
1092
|
+
* // - Install the npm module by running:
|
|
1093
|
+
* // ```sh
|
|
1094
|
+
* // $ npm install googleapis
|
|
1095
|
+
* // ```
|
|
1096
|
+
*
|
|
1097
|
+
* const {google} = require('googleapis');
|
|
1098
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1099
|
+
*
|
|
1100
|
+
* async function main() {
|
|
1101
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1102
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1103
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1104
|
+
* });
|
|
1105
|
+
*
|
|
1106
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1107
|
+
* const authClient = await auth.getClient();
|
|
1108
|
+
* google.options({auth: authClient});
|
|
1109
|
+
*
|
|
1110
|
+
* // Do the magic
|
|
1111
|
+
* const res = await storagebatchoperations.projects.locations.operations.cancel(
|
|
1112
|
+
* {
|
|
1113
|
+
* // The name of the operation resource to be cancelled.
|
|
1114
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1115
|
+
*
|
|
1116
|
+
* // Request body metadata
|
|
1117
|
+
* requestBody: {
|
|
1118
|
+
* // request body parameters
|
|
1119
|
+
* // {}
|
|
1120
|
+
* },
|
|
1121
|
+
* },
|
|
1122
|
+
* );
|
|
1123
|
+
* console.log(res.data);
|
|
1124
|
+
*
|
|
1125
|
+
* // Example response
|
|
1126
|
+
* // {}
|
|
1127
|
+
* }
|
|
1128
|
+
*
|
|
1129
|
+
* main().catch(e => {
|
|
1130
|
+
* console.error(e);
|
|
1131
|
+
* throw e;
|
|
1132
|
+
* });
|
|
1133
|
+
*
|
|
1134
|
+
* ```
|
|
690
1135
|
*
|
|
691
1136
|
* @param params - Parameters for request
|
|
692
1137
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -701,6 +1146,52 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
701
1146
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
702
1147
|
/**
|
|
703
1148
|
* 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`.
|
|
1149
|
+
* @example
|
|
1150
|
+
* ```js
|
|
1151
|
+
* // Before running the sample:
|
|
1152
|
+
* // - Enable the API at:
|
|
1153
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1154
|
+
* // - Login into gcloud by running:
|
|
1155
|
+
* // ```sh
|
|
1156
|
+
* // $ gcloud auth application-default login
|
|
1157
|
+
* // ```
|
|
1158
|
+
* // - Install the npm module by running:
|
|
1159
|
+
* // ```sh
|
|
1160
|
+
* // $ npm install googleapis
|
|
1161
|
+
* // ```
|
|
1162
|
+
*
|
|
1163
|
+
* const {google} = require('googleapis');
|
|
1164
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1165
|
+
*
|
|
1166
|
+
* async function main() {
|
|
1167
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1168
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1169
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1170
|
+
* });
|
|
1171
|
+
*
|
|
1172
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1173
|
+
* const authClient = await auth.getClient();
|
|
1174
|
+
* google.options({auth: authClient});
|
|
1175
|
+
*
|
|
1176
|
+
* // Do the magic
|
|
1177
|
+
* const res = await storagebatchoperations.projects.locations.operations.delete(
|
|
1178
|
+
* {
|
|
1179
|
+
* // The name of the operation resource to be deleted.
|
|
1180
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1181
|
+
* },
|
|
1182
|
+
* );
|
|
1183
|
+
* console.log(res.data);
|
|
1184
|
+
*
|
|
1185
|
+
* // Example response
|
|
1186
|
+
* // {}
|
|
1187
|
+
* }
|
|
1188
|
+
*
|
|
1189
|
+
* main().catch(e => {
|
|
1190
|
+
* console.error(e);
|
|
1191
|
+
* throw e;
|
|
1192
|
+
* });
|
|
1193
|
+
*
|
|
1194
|
+
* ```
|
|
704
1195
|
*
|
|
705
1196
|
* @param params - Parameters for request
|
|
706
1197
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -715,6 +1206,56 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
715
1206
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
716
1207
|
/**
|
|
717
1208
|
* 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.
|
|
1209
|
+
* @example
|
|
1210
|
+
* ```js
|
|
1211
|
+
* // Before running the sample:
|
|
1212
|
+
* // - Enable the API at:
|
|
1213
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1214
|
+
* // - Login into gcloud by running:
|
|
1215
|
+
* // ```sh
|
|
1216
|
+
* // $ gcloud auth application-default login
|
|
1217
|
+
* // ```
|
|
1218
|
+
* // - Install the npm module by running:
|
|
1219
|
+
* // ```sh
|
|
1220
|
+
* // $ npm install googleapis
|
|
1221
|
+
* // ```
|
|
1222
|
+
*
|
|
1223
|
+
* const {google} = require('googleapis');
|
|
1224
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1225
|
+
*
|
|
1226
|
+
* async function main() {
|
|
1227
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1228
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1229
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1230
|
+
* });
|
|
1231
|
+
*
|
|
1232
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1233
|
+
* const authClient = await auth.getClient();
|
|
1234
|
+
* google.options({auth: authClient});
|
|
1235
|
+
*
|
|
1236
|
+
* // Do the magic
|
|
1237
|
+
* const res = await storagebatchoperations.projects.locations.operations.get({
|
|
1238
|
+
* // The name of the operation resource.
|
|
1239
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1240
|
+
* });
|
|
1241
|
+
* console.log(res.data);
|
|
1242
|
+
*
|
|
1243
|
+
* // Example response
|
|
1244
|
+
* // {
|
|
1245
|
+
* // "done": false,
|
|
1246
|
+
* // "error": {},
|
|
1247
|
+
* // "metadata": {},
|
|
1248
|
+
* // "name": "my_name",
|
|
1249
|
+
* // "response": {}
|
|
1250
|
+
* // }
|
|
1251
|
+
* }
|
|
1252
|
+
*
|
|
1253
|
+
* main().catch(e => {
|
|
1254
|
+
* console.error(e);
|
|
1255
|
+
* throw e;
|
|
1256
|
+
* });
|
|
1257
|
+
*
|
|
1258
|
+
* ```
|
|
718
1259
|
*
|
|
719
1260
|
* @param params - Parameters for request
|
|
720
1261
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -729,6 +1270,59 @@ export declare namespace storagebatchoperations_v1 {
|
|
|
729
1270
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
730
1271
|
/**
|
|
731
1272
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
1273
|
+
* @example
|
|
1274
|
+
* ```js
|
|
1275
|
+
* // Before running the sample:
|
|
1276
|
+
* // - Enable the API at:
|
|
1277
|
+
* // https://console.developers.google.com/apis/api/storagebatchoperations.googleapis.com
|
|
1278
|
+
* // - Login into gcloud by running:
|
|
1279
|
+
* // ```sh
|
|
1280
|
+
* // $ gcloud auth application-default login
|
|
1281
|
+
* // ```
|
|
1282
|
+
* // - Install the npm module by running:
|
|
1283
|
+
* // ```sh
|
|
1284
|
+
* // $ npm install googleapis
|
|
1285
|
+
* // ```
|
|
1286
|
+
*
|
|
1287
|
+
* const {google} = require('googleapis');
|
|
1288
|
+
* const storagebatchoperations = google.storagebatchoperations('v1');
|
|
1289
|
+
*
|
|
1290
|
+
* async function main() {
|
|
1291
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1292
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1293
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1294
|
+
* });
|
|
1295
|
+
*
|
|
1296
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1297
|
+
* const authClient = await auth.getClient();
|
|
1298
|
+
* google.options({auth: authClient});
|
|
1299
|
+
*
|
|
1300
|
+
* // Do the magic
|
|
1301
|
+
* const res = await storagebatchoperations.projects.locations.operations.list({
|
|
1302
|
+
* // The standard list filter.
|
|
1303
|
+
* filter: 'placeholder-value',
|
|
1304
|
+
* // The name of the operation's parent resource.
|
|
1305
|
+
* name: 'projects/my-project/locations/my-location',
|
|
1306
|
+
* // The standard list page size.
|
|
1307
|
+
* pageSize: 'placeholder-value',
|
|
1308
|
+
* // The standard list page token.
|
|
1309
|
+
* pageToken: 'placeholder-value',
|
|
1310
|
+
* });
|
|
1311
|
+
* console.log(res.data);
|
|
1312
|
+
*
|
|
1313
|
+
* // Example response
|
|
1314
|
+
* // {
|
|
1315
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1316
|
+
* // "operations": []
|
|
1317
|
+
* // }
|
|
1318
|
+
* }
|
|
1319
|
+
*
|
|
1320
|
+
* main().catch(e => {
|
|
1321
|
+
* console.error(e);
|
|
1322
|
+
* throw e;
|
|
1323
|
+
* });
|
|
1324
|
+
*
|
|
1325
|
+
* ```
|
|
732
1326
|
*
|
|
733
1327
|
* @param params - Parameters for request
|
|
734
1328
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|