@googleapis/storagetransfer 3.0.1 → 4.0.1
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/build/index.js +4 -3
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +112 -819
- package/build/v1.js +64 -32
- package/build/v1.js.map +1 -1
- package/package.json +6 -6
- package/v1.ts +184 -819
package/build/v1.d.ts
CHANGED
|
@@ -108,6 +108,31 @@ export declare namespace storagetransfer_v1 {
|
|
|
108
108
|
*/
|
|
109
109
|
secretAccessKey?: string | null;
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* An AwsS3CompatibleData resource.
|
|
113
|
+
*/
|
|
114
|
+
export interface Schema$AwsS3CompatibleData {
|
|
115
|
+
/**
|
|
116
|
+
* Required. Specifies the name of the bucket.
|
|
117
|
+
*/
|
|
118
|
+
bucketName?: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* Required. Specifies the endpoint of the storage service.
|
|
121
|
+
*/
|
|
122
|
+
endpoint?: string | null;
|
|
123
|
+
/**
|
|
124
|
+
* Specifies the root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.
|
|
125
|
+
*/
|
|
126
|
+
path?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* Specifies the region to sign requests with. This can be left blank if requests should be signed with an empty region.
|
|
129
|
+
*/
|
|
130
|
+
region?: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* A S3 compatible metadata.
|
|
133
|
+
*/
|
|
134
|
+
s3Metadata?: Schema$S3CompatibleMetadata;
|
|
135
|
+
}
|
|
111
136
|
/**
|
|
112
137
|
* An AwsS3Data resource can be a data source, but not a data sink. In an AwsS3Data resource, an object's name is the S3 object's key name.
|
|
113
138
|
*/
|
|
@@ -120,6 +145,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
120
145
|
* Required. S3 Bucket name (see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
|
|
121
146
|
*/
|
|
122
147
|
bucketName?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { "sas_token" : "SAS_TOKEN" \} GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number\}/secrets/{secret_name\}`
|
|
150
|
+
*/
|
|
151
|
+
credentialsSecret?: string | null;
|
|
123
152
|
/**
|
|
124
153
|
* Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.
|
|
125
154
|
*/
|
|
@@ -141,6 +170,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
141
170
|
* Required. The container to transfer from the Azure Storage account.
|
|
142
171
|
*/
|
|
143
172
|
container?: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { "sas_token" : "SAS_TOKEN" \} GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number\}/secrets/{secret_name\}`
|
|
175
|
+
*/
|
|
176
|
+
credentialsSecret?: string | null;
|
|
144
177
|
/**
|
|
145
178
|
* Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.
|
|
146
179
|
*/
|
|
@@ -225,6 +258,23 @@ export declare namespace storagetransfer_v1 {
|
|
|
225
258
|
*/
|
|
226
259
|
errorLogEntries?: Schema$ErrorLogEntry[];
|
|
227
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Specifies the Event-driven transfer options. Event-driven transfers listen to an event stream to transfer updated files.
|
|
263
|
+
*/
|
|
264
|
+
export interface Schema$EventStream {
|
|
265
|
+
/**
|
|
266
|
+
* Specifies the data and time at which Storage Transfer Service stops listening for events from this stream. After this time, any transfers in progress will complete, but no new transfers are initiated.
|
|
267
|
+
*/
|
|
268
|
+
eventStreamExpirationTime?: string | null;
|
|
269
|
+
/**
|
|
270
|
+
* Specifies the date and time that Storage Transfer Service starts listening for events from this stream. If no start time is specified or start time is in the past, Storage Transfer Service starts listening immediately.
|
|
271
|
+
*/
|
|
272
|
+
eventStreamStartTime?: string | null;
|
|
273
|
+
/**
|
|
274
|
+
* Required. Specifies a unique name of the resource such as AWS SQS ARN in the form 'arn:aws:sqs:region:account_id:queue_name', or Pub/Sub subscription resource name in the form 'projects/{project\}/subscriptions/{sub\}'.
|
|
275
|
+
*/
|
|
276
|
+
name?: string | null;
|
|
277
|
+
}
|
|
228
278
|
/**
|
|
229
279
|
* In a GcsData resource, an object's name is the Cloud Storage object's name and its "last modification time" refers to the object's `updated` property of Cloud Storage objects, which changes when the content or the metadata of the object is updated.
|
|
230
280
|
*/
|
|
@@ -426,7 +476,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
426
476
|
*/
|
|
427
477
|
name?: string | null;
|
|
428
478
|
/**
|
|
429
|
-
* The normal response of the operation
|
|
479
|
+
* The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
|
|
430
480
|
*/
|
|
431
481
|
response?: {
|
|
432
482
|
[key: string]: any;
|
|
@@ -460,6 +510,27 @@ export declare namespace storagetransfer_v1 {
|
|
|
460
510
|
*/
|
|
461
511
|
projectId?: string | null;
|
|
462
512
|
}
|
|
513
|
+
/**
|
|
514
|
+
* S3CompatibleMetadata contains the metadata fields that apply to the basic types of S3-compatible data providers.
|
|
515
|
+
*/
|
|
516
|
+
export interface Schema$S3CompatibleMetadata {
|
|
517
|
+
/**
|
|
518
|
+
* Specifies the authentication and authorization method used by the storage service. When not specified, Transfer Service will attempt to determine right auth method to use.
|
|
519
|
+
*/
|
|
520
|
+
authMethod?: string | null;
|
|
521
|
+
/**
|
|
522
|
+
* The Listing API to use for discovering objects. When not specified, Transfer Service will attempt to determine the right API to use.
|
|
523
|
+
*/
|
|
524
|
+
listApi?: string | null;
|
|
525
|
+
/**
|
|
526
|
+
* Specifies the network protocol of the agent. When not specified, the default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
|
|
527
|
+
*/
|
|
528
|
+
protocol?: string | null;
|
|
529
|
+
/**
|
|
530
|
+
* Specifies the API request model used to call the storage service. When not specified, the default value of RequestModel REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
|
|
531
|
+
*/
|
|
532
|
+
requestModel?: string | null;
|
|
533
|
+
}
|
|
463
534
|
/**
|
|
464
535
|
* Transfers can be scheduled to recur or to run just once.
|
|
465
536
|
*/
|
|
@@ -630,6 +701,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
630
701
|
* A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.
|
|
631
702
|
*/
|
|
632
703
|
description?: string | null;
|
|
704
|
+
/**
|
|
705
|
+
* Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored.
|
|
706
|
+
*/
|
|
707
|
+
eventStream?: Schema$EventStream;
|
|
633
708
|
/**
|
|
634
709
|
* Output only. The time that the transfer job was last modified.
|
|
635
710
|
*/
|
|
@@ -692,6 +767,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
692
767
|
* Summarizes errors encountered with sample error log entries.
|
|
693
768
|
*/
|
|
694
769
|
errorBreakdowns?: Schema$ErrorSummary[];
|
|
770
|
+
/**
|
|
771
|
+
* Cloud Logging configuration.
|
|
772
|
+
*/
|
|
773
|
+
loggingConfig?: Schema$LoggingConfig;
|
|
695
774
|
/**
|
|
696
775
|
* A globally unique ID assigned by the system.
|
|
697
776
|
*/
|
|
@@ -734,7 +813,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
734
813
|
*/
|
|
735
814
|
deleteObjectsUniqueInSink?: boolean | null;
|
|
736
815
|
/**
|
|
737
|
-
* Represents the selected metadata options for a transfer job.
|
|
816
|
+
* Represents the selected metadata options for a transfer job.
|
|
738
817
|
*/
|
|
739
818
|
metadataOptions?: Schema$MetadataOptions;
|
|
740
819
|
/**
|
|
@@ -750,6 +829,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
750
829
|
* Configuration for running a transfer.
|
|
751
830
|
*/
|
|
752
831
|
export interface Schema$TransferSpec {
|
|
832
|
+
/**
|
|
833
|
+
* An AWS S3 compatible data source.
|
|
834
|
+
*/
|
|
835
|
+
awsS3CompatibleDataSource?: Schema$AwsS3CompatibleData;
|
|
753
836
|
/**
|
|
754
837
|
* An AWS S3 data source.
|
|
755
838
|
*/
|
|
@@ -767,7 +850,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
767
850
|
*/
|
|
768
851
|
gcsDataSource?: Schema$GcsData;
|
|
769
852
|
/**
|
|
770
|
-
* Cloud Storage intermediate data
|
|
853
|
+
* For transfers between file systems, specifies a Cloud Storage bucket to be used as an intermediate location through which to transfer data. See [Transfer data between file systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for more information.
|
|
771
854
|
*/
|
|
772
855
|
gcsIntermediateDataLocation?: Schema$GcsData;
|
|
773
856
|
/**
|
|
@@ -812,7 +895,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
812
895
|
*/
|
|
813
896
|
projectId?: string | null;
|
|
814
897
|
/**
|
|
815
|
-
* Required. The job to update. `transferJob` is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requires `storagetransfer.jobs.delete`
|
|
898
|
+
* Required. The job to update. `transferJob` is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requires `storagetransfer.jobs.delete` permission.
|
|
816
899
|
*/
|
|
817
900
|
transferJob?: Schema$TransferJob;
|
|
818
901
|
/**
|
|
@@ -825,49 +908,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
825
908
|
constructor(context: APIRequestContext);
|
|
826
909
|
/**
|
|
827
910
|
* Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Cloud project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.
|
|
828
|
-
* @example
|
|
829
|
-
* ```js
|
|
830
|
-
* // Before running the sample:
|
|
831
|
-
* // - Enable the API at:
|
|
832
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
833
|
-
* // - Login into gcloud by running:
|
|
834
|
-
* // `$ gcloud auth application-default login`
|
|
835
|
-
* // - Install the npm module by running:
|
|
836
|
-
* // `$ npm install googleapis`
|
|
837
|
-
*
|
|
838
|
-
* const {google} = require('googleapis');
|
|
839
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
840
|
-
*
|
|
841
|
-
* async function main() {
|
|
842
|
-
* const auth = new google.auth.GoogleAuth({
|
|
843
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
844
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
845
|
-
* });
|
|
846
|
-
*
|
|
847
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
848
|
-
* const authClient = await auth.getClient();
|
|
849
|
-
* google.options({auth: authClient});
|
|
850
|
-
*
|
|
851
|
-
* // Do the magic
|
|
852
|
-
* const res = await storagetransfer.googleServiceAccounts.get({
|
|
853
|
-
* // Required. The ID of the Google Cloud project that the Google service account is associated with.
|
|
854
|
-
* projectId: 'placeholder-value',
|
|
855
|
-
* });
|
|
856
|
-
* console.log(res.data);
|
|
857
|
-
*
|
|
858
|
-
* // Example response
|
|
859
|
-
* // {
|
|
860
|
-
* // "accountEmail": "my_accountEmail",
|
|
861
|
-
* // "subjectId": "my_subjectId"
|
|
862
|
-
* // }
|
|
863
|
-
* }
|
|
864
|
-
*
|
|
865
|
-
* main().catch(e => {
|
|
866
|
-
* console.error(e);
|
|
867
|
-
* throw e;
|
|
868
|
-
* });
|
|
869
|
-
*
|
|
870
|
-
* ```
|
|
871
911
|
*
|
|
872
912
|
* @param params - Parameters for request
|
|
873
913
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -897,64 +937,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
897
937
|
constructor(context: APIRequestContext);
|
|
898
938
|
/**
|
|
899
939
|
* Creates an agent pool resource.
|
|
900
|
-
* @example
|
|
901
|
-
* ```js
|
|
902
|
-
* // Before running the sample:
|
|
903
|
-
* // - Enable the API at:
|
|
904
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
905
|
-
* // - Login into gcloud by running:
|
|
906
|
-
* // `$ gcloud auth application-default login`
|
|
907
|
-
* // - Install the npm module by running:
|
|
908
|
-
* // `$ npm install googleapis`
|
|
909
|
-
*
|
|
910
|
-
* const {google} = require('googleapis');
|
|
911
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
912
|
-
*
|
|
913
|
-
* async function main() {
|
|
914
|
-
* const auth = new google.auth.GoogleAuth({
|
|
915
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
916
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
917
|
-
* });
|
|
918
|
-
*
|
|
919
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
920
|
-
* const authClient = await auth.getClient();
|
|
921
|
-
* google.options({auth: authClient});
|
|
922
|
-
*
|
|
923
|
-
* // Do the magic
|
|
924
|
-
* const res = await storagetransfer.projects.agentPools.create({
|
|
925
|
-
* // Required. The ID of the agent pool to create. The `agent_pool_id` must meet the following requirements: * Length of 128 characters or less. * Not start with the string `goog`. * Start with a lowercase ASCII character, followed by: * Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). * One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
|
|
926
|
-
* agentPoolId: 'placeholder-value',
|
|
927
|
-
* // Required. The ID of the Google Cloud project that owns the agent pool.
|
|
928
|
-
* projectId: '[^/]+',
|
|
929
|
-
*
|
|
930
|
-
* // Request body metadata
|
|
931
|
-
* requestBody: {
|
|
932
|
-
* // request body parameters
|
|
933
|
-
* // {
|
|
934
|
-
* // "bandwidthLimit": {},
|
|
935
|
-
* // "displayName": "my_displayName",
|
|
936
|
-
* // "name": "my_name",
|
|
937
|
-
* // "state": "my_state"
|
|
938
|
-
* // }
|
|
939
|
-
* },
|
|
940
|
-
* });
|
|
941
|
-
* console.log(res.data);
|
|
942
|
-
*
|
|
943
|
-
* // Example response
|
|
944
|
-
* // {
|
|
945
|
-
* // "bandwidthLimit": {},
|
|
946
|
-
* // "displayName": "my_displayName",
|
|
947
|
-
* // "name": "my_name",
|
|
948
|
-
* // "state": "my_state"
|
|
949
|
-
* // }
|
|
950
|
-
* }
|
|
951
|
-
*
|
|
952
|
-
* main().catch(e => {
|
|
953
|
-
* console.error(e);
|
|
954
|
-
* throw e;
|
|
955
|
-
* });
|
|
956
|
-
*
|
|
957
|
-
* ```
|
|
958
940
|
*
|
|
959
941
|
* @param params - Parameters for request
|
|
960
942
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -969,46 +951,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
969
951
|
create(callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
970
952
|
/**
|
|
971
953
|
* Deletes an agent pool.
|
|
972
|
-
* @example
|
|
973
|
-
* ```js
|
|
974
|
-
* // Before running the sample:
|
|
975
|
-
* // - Enable the API at:
|
|
976
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
977
|
-
* // - Login into gcloud by running:
|
|
978
|
-
* // `$ gcloud auth application-default login`
|
|
979
|
-
* // - Install the npm module by running:
|
|
980
|
-
* // `$ npm install googleapis`
|
|
981
|
-
*
|
|
982
|
-
* const {google} = require('googleapis');
|
|
983
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
984
|
-
*
|
|
985
|
-
* async function main() {
|
|
986
|
-
* const auth = new google.auth.GoogleAuth({
|
|
987
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
988
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
989
|
-
* });
|
|
990
|
-
*
|
|
991
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
992
|
-
* const authClient = await auth.getClient();
|
|
993
|
-
* google.options({auth: authClient});
|
|
994
|
-
*
|
|
995
|
-
* // Do the magic
|
|
996
|
-
* const res = await storagetransfer.projects.agentPools.delete({
|
|
997
|
-
* // Required. The name of the agent pool to delete.
|
|
998
|
-
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
999
|
-
* });
|
|
1000
|
-
* console.log(res.data);
|
|
1001
|
-
*
|
|
1002
|
-
* // Example response
|
|
1003
|
-
* // {}
|
|
1004
|
-
* }
|
|
1005
|
-
*
|
|
1006
|
-
* main().catch(e => {
|
|
1007
|
-
* console.error(e);
|
|
1008
|
-
* throw e;
|
|
1009
|
-
* });
|
|
1010
|
-
*
|
|
1011
|
-
* ```
|
|
1012
954
|
*
|
|
1013
955
|
* @param params - Parameters for request
|
|
1014
956
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1023,51 +965,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1023
965
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1024
966
|
/**
|
|
1025
967
|
* Gets an agent pool.
|
|
1026
|
-
* @example
|
|
1027
|
-
* ```js
|
|
1028
|
-
* // Before running the sample:
|
|
1029
|
-
* // - Enable the API at:
|
|
1030
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1031
|
-
* // - Login into gcloud by running:
|
|
1032
|
-
* // `$ gcloud auth application-default login`
|
|
1033
|
-
* // - Install the npm module by running:
|
|
1034
|
-
* // `$ npm install googleapis`
|
|
1035
|
-
*
|
|
1036
|
-
* const {google} = require('googleapis');
|
|
1037
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1038
|
-
*
|
|
1039
|
-
* async function main() {
|
|
1040
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1041
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1042
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1043
|
-
* });
|
|
1044
|
-
*
|
|
1045
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1046
|
-
* const authClient = await auth.getClient();
|
|
1047
|
-
* google.options({auth: authClient});
|
|
1048
|
-
*
|
|
1049
|
-
* // Do the magic
|
|
1050
|
-
* const res = await storagetransfer.projects.agentPools.get({
|
|
1051
|
-
* // Required. The name of the agent pool to get.
|
|
1052
|
-
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1053
|
-
* });
|
|
1054
|
-
* console.log(res.data);
|
|
1055
|
-
*
|
|
1056
|
-
* // Example response
|
|
1057
|
-
* // {
|
|
1058
|
-
* // "bandwidthLimit": {},
|
|
1059
|
-
* // "displayName": "my_displayName",
|
|
1060
|
-
* // "name": "my_name",
|
|
1061
|
-
* // "state": "my_state"
|
|
1062
|
-
* // }
|
|
1063
|
-
* }
|
|
1064
|
-
*
|
|
1065
|
-
* main().catch(e => {
|
|
1066
|
-
* console.error(e);
|
|
1067
|
-
* throw e;
|
|
1068
|
-
* });
|
|
1069
|
-
*
|
|
1070
|
-
* ```
|
|
1071
968
|
*
|
|
1072
969
|
* @param params - Parameters for request
|
|
1073
970
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1082,55 +979,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1082
979
|
get(callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1083
980
|
/**
|
|
1084
981
|
* Lists agent pools.
|
|
1085
|
-
* @example
|
|
1086
|
-
* ```js
|
|
1087
|
-
* // Before running the sample:
|
|
1088
|
-
* // - Enable the API at:
|
|
1089
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1090
|
-
* // - Login into gcloud by running:
|
|
1091
|
-
* // `$ gcloud auth application-default login`
|
|
1092
|
-
* // - Install the npm module by running:
|
|
1093
|
-
* // `$ npm install googleapis`
|
|
1094
|
-
*
|
|
1095
|
-
* const {google} = require('googleapis');
|
|
1096
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1097
|
-
*
|
|
1098
|
-
* async function main() {
|
|
1099
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1100
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1101
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1102
|
-
* });
|
|
1103
|
-
*
|
|
1104
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1105
|
-
* const authClient = await auth.getClient();
|
|
1106
|
-
* google.options({auth: authClient});
|
|
1107
|
-
*
|
|
1108
|
-
* // Do the magic
|
|
1109
|
-
* const res = await storagetransfer.projects.agentPools.list({
|
|
1110
|
-
* // An optional list of query parameters specified as JSON text in the form of: `{"agentPoolNames":["agentpool1","agentpool2",...]\}` Since `agentPoolNames` support multiple values, its values must be specified with array notation. When the filter is either empty or not provided, the list returns all agent pools for the project.
|
|
1111
|
-
* filter: 'placeholder-value',
|
|
1112
|
-
* // The list page size. The max allowed value is `256`.
|
|
1113
|
-
* pageSize: 'placeholder-value',
|
|
1114
|
-
* // The list page token.
|
|
1115
|
-
* pageToken: 'placeholder-value',
|
|
1116
|
-
* // Required. The ID of the Google Cloud project that owns the job.
|
|
1117
|
-
* projectId: '[^/]+',
|
|
1118
|
-
* });
|
|
1119
|
-
* console.log(res.data);
|
|
1120
|
-
*
|
|
1121
|
-
* // Example response
|
|
1122
|
-
* // {
|
|
1123
|
-
* // "agentPools": [],
|
|
1124
|
-
* // "nextPageToken": "my_nextPageToken"
|
|
1125
|
-
* // }
|
|
1126
|
-
* }
|
|
1127
|
-
*
|
|
1128
|
-
* main().catch(e => {
|
|
1129
|
-
* console.error(e);
|
|
1130
|
-
* throw e;
|
|
1131
|
-
* });
|
|
1132
|
-
*
|
|
1133
|
-
* ```
|
|
1134
982
|
*
|
|
1135
983
|
* @param params - Parameters for request
|
|
1136
984
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1145,64 +993,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1145
993
|
list(callback: BodyResponseCallback<Schema$ListAgentPoolsResponse>): void;
|
|
1146
994
|
/**
|
|
1147
995
|
* Updates an existing agent pool resource.
|
|
1148
|
-
* @example
|
|
1149
|
-
* ```js
|
|
1150
|
-
* // Before running the sample:
|
|
1151
|
-
* // - Enable the API at:
|
|
1152
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1153
|
-
* // - Login into gcloud by running:
|
|
1154
|
-
* // `$ gcloud auth application-default login`
|
|
1155
|
-
* // - Install the npm module by running:
|
|
1156
|
-
* // `$ npm install googleapis`
|
|
1157
|
-
*
|
|
1158
|
-
* const {google} = require('googleapis');
|
|
1159
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1160
|
-
*
|
|
1161
|
-
* async function main() {
|
|
1162
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1163
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1164
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1165
|
-
* });
|
|
1166
|
-
*
|
|
1167
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1168
|
-
* const authClient = await auth.getClient();
|
|
1169
|
-
* google.options({auth: authClient});
|
|
1170
|
-
*
|
|
1171
|
-
* // Do the magic
|
|
1172
|
-
* const res = await storagetransfer.projects.agentPools.patch({
|
|
1173
|
-
* // Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id\}/agentPools/{agent_pool_id\}`
|
|
1174
|
-
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1175
|
-
* // The [field mask] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) of the fields in `agentPool` to update in this request. The following `agentPool` fields can be updated: * display_name * bandwidth_limit
|
|
1176
|
-
* updateMask: 'placeholder-value',
|
|
1177
|
-
*
|
|
1178
|
-
* // Request body metadata
|
|
1179
|
-
* requestBody: {
|
|
1180
|
-
* // request body parameters
|
|
1181
|
-
* // {
|
|
1182
|
-
* // "bandwidthLimit": {},
|
|
1183
|
-
* // "displayName": "my_displayName",
|
|
1184
|
-
* // "name": "my_name",
|
|
1185
|
-
* // "state": "my_state"
|
|
1186
|
-
* // }
|
|
1187
|
-
* },
|
|
1188
|
-
* });
|
|
1189
|
-
* console.log(res.data);
|
|
1190
|
-
*
|
|
1191
|
-
* // Example response
|
|
1192
|
-
* // {
|
|
1193
|
-
* // "bandwidthLimit": {},
|
|
1194
|
-
* // "displayName": "my_displayName",
|
|
1195
|
-
* // "name": "my_name",
|
|
1196
|
-
* // "state": "my_state"
|
|
1197
|
-
* // }
|
|
1198
|
-
* }
|
|
1199
|
-
*
|
|
1200
|
-
* main().catch(e => {
|
|
1201
|
-
* console.error(e);
|
|
1202
|
-
* throw e;
|
|
1203
|
-
* });
|
|
1204
|
-
*
|
|
1205
|
-
* ```
|
|
1206
996
|
*
|
|
1207
997
|
* @param params - Parameters for request
|
|
1208
998
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1279,75 +1069,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1279
1069
|
constructor(context: APIRequestContext);
|
|
1280
1070
|
/**
|
|
1281
1071
|
* Creates a transfer job that runs periodically.
|
|
1282
|
-
* @example
|
|
1283
|
-
* ```js
|
|
1284
|
-
* // Before running the sample:
|
|
1285
|
-
* // - Enable the API at:
|
|
1286
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1287
|
-
* // - Login into gcloud by running:
|
|
1288
|
-
* // `$ gcloud auth application-default login`
|
|
1289
|
-
* // - Install the npm module by running:
|
|
1290
|
-
* // `$ npm install googleapis`
|
|
1291
|
-
*
|
|
1292
|
-
* const {google} = require('googleapis');
|
|
1293
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1294
|
-
*
|
|
1295
|
-
* async function main() {
|
|
1296
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1297
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1298
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1299
|
-
* });
|
|
1300
|
-
*
|
|
1301
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1302
|
-
* const authClient = await auth.getClient();
|
|
1303
|
-
* google.options({auth: authClient});
|
|
1304
|
-
*
|
|
1305
|
-
* // Do the magic
|
|
1306
|
-
* const res = await storagetransfer.transferJobs.create({
|
|
1307
|
-
* // Request body metadata
|
|
1308
|
-
* requestBody: {
|
|
1309
|
-
* // request body parameters
|
|
1310
|
-
* // {
|
|
1311
|
-
* // "creationTime": "my_creationTime",
|
|
1312
|
-
* // "deletionTime": "my_deletionTime",
|
|
1313
|
-
* // "description": "my_description",
|
|
1314
|
-
* // "lastModificationTime": "my_lastModificationTime",
|
|
1315
|
-
* // "latestOperationName": "my_latestOperationName",
|
|
1316
|
-
* // "loggingConfig": {},
|
|
1317
|
-
* // "name": "my_name",
|
|
1318
|
-
* // "notificationConfig": {},
|
|
1319
|
-
* // "projectId": "my_projectId",
|
|
1320
|
-
* // "schedule": {},
|
|
1321
|
-
* // "status": "my_status",
|
|
1322
|
-
* // "transferSpec": {}
|
|
1323
|
-
* // }
|
|
1324
|
-
* },
|
|
1325
|
-
* });
|
|
1326
|
-
* console.log(res.data);
|
|
1327
|
-
*
|
|
1328
|
-
* // Example response
|
|
1329
|
-
* // {
|
|
1330
|
-
* // "creationTime": "my_creationTime",
|
|
1331
|
-
* // "deletionTime": "my_deletionTime",
|
|
1332
|
-
* // "description": "my_description",
|
|
1333
|
-
* // "lastModificationTime": "my_lastModificationTime",
|
|
1334
|
-
* // "latestOperationName": "my_latestOperationName",
|
|
1335
|
-
* // "loggingConfig": {},
|
|
1336
|
-
* // "name": "my_name",
|
|
1337
|
-
* // "notificationConfig": {},
|
|
1338
|
-
* // "projectId": "my_projectId",
|
|
1339
|
-
* // "schedule": {},
|
|
1340
|
-
* // "status": "my_status",
|
|
1341
|
-
* // "transferSpec": {}
|
|
1342
|
-
* // }
|
|
1343
|
-
* }
|
|
1344
|
-
*
|
|
1345
|
-
* main().catch(e => {
|
|
1346
|
-
* console.error(e);
|
|
1347
|
-
* throw e;
|
|
1348
|
-
* });
|
|
1349
|
-
*
|
|
1350
|
-
* ```
|
|
1351
1072
|
*
|
|
1352
1073
|
* @param params - Parameters for request
|
|
1353
1074
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1361,62 +1082,21 @@ export declare namespace storagetransfer_v1 {
|
|
|
1361
1082
|
create(params: Params$Resource$Transferjobs$Create, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1362
1083
|
create(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1363
1084
|
/**
|
|
1364
|
-
*
|
|
1365
|
-
* @example
|
|
1366
|
-
* ```js
|
|
1367
|
-
* // Before running the sample:
|
|
1368
|
-
* // - Enable the API at:
|
|
1369
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1370
|
-
* // - Login into gcloud by running:
|
|
1371
|
-
* // `$ gcloud auth application-default login`
|
|
1372
|
-
* // - Install the npm module by running:
|
|
1373
|
-
* // `$ npm install googleapis`
|
|
1374
|
-
*
|
|
1375
|
-
* const {google} = require('googleapis');
|
|
1376
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1377
|
-
*
|
|
1378
|
-
* async function main() {
|
|
1379
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1380
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1381
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1382
|
-
* });
|
|
1383
|
-
*
|
|
1384
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1385
|
-
* const authClient = await auth.getClient();
|
|
1386
|
-
* google.options({auth: authClient});
|
|
1387
|
-
*
|
|
1388
|
-
* // Do the magic
|
|
1389
|
-
* const res = await storagetransfer.transferJobs.get({
|
|
1390
|
-
* // Required. The job to get.
|
|
1391
|
-
* jobName: 'transferJobs/.*',
|
|
1392
|
-
* // Required. The ID of the Google Cloud project that owns the job.
|
|
1393
|
-
* projectId: 'placeholder-value',
|
|
1394
|
-
* });
|
|
1395
|
-
* console.log(res.data);
|
|
1085
|
+
* Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
|
|
1396
1086
|
*
|
|
1397
|
-
*
|
|
1398
|
-
*
|
|
1399
|
-
*
|
|
1400
|
-
*
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
*
|
|
1410
|
-
* // "transferSpec": {}
|
|
1411
|
-
* // }
|
|
1412
|
-
* }
|
|
1413
|
-
*
|
|
1414
|
-
* main().catch(e => {
|
|
1415
|
-
* console.error(e);
|
|
1416
|
-
* throw e;
|
|
1417
|
-
* });
|
|
1418
|
-
*
|
|
1419
|
-
* ```
|
|
1087
|
+
* @param params - Parameters for request
|
|
1088
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1089
|
+
* @param callback - Optional callback that handles the response.
|
|
1090
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1091
|
+
*/
|
|
1092
|
+
delete(params: Params$Resource$Transferjobs$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
1093
|
+
delete(params?: Params$Resource$Transferjobs$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
|
|
1094
|
+
delete(params: Params$Resource$Transferjobs$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1095
|
+
delete(params: Params$Resource$Transferjobs$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1096
|
+
delete(params: Params$Resource$Transferjobs$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1097
|
+
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1098
|
+
/**
|
|
1099
|
+
* Gets a transfer job.
|
|
1420
1100
|
*
|
|
1421
1101
|
* @param params - Parameters for request
|
|
1422
1102
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1431,53 +1111,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1431
1111
|
get(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1432
1112
|
/**
|
|
1433
1113
|
* Lists transfer jobs.
|
|
1434
|
-
* @example
|
|
1435
|
-
* ```js
|
|
1436
|
-
* // Before running the sample:
|
|
1437
|
-
* // - Enable the API at:
|
|
1438
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1439
|
-
* // - Login into gcloud by running:
|
|
1440
|
-
* // `$ gcloud auth application-default login`
|
|
1441
|
-
* // - Install the npm module by running:
|
|
1442
|
-
* // `$ npm install googleapis`
|
|
1443
|
-
*
|
|
1444
|
-
* const {google} = require('googleapis');
|
|
1445
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1446
|
-
*
|
|
1447
|
-
* async function main() {
|
|
1448
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1449
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1450
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1451
|
-
* });
|
|
1452
|
-
*
|
|
1453
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1454
|
-
* const authClient = await auth.getClient();
|
|
1455
|
-
* google.options({auth: authClient});
|
|
1456
|
-
*
|
|
1457
|
-
* // Do the magic
|
|
1458
|
-
* const res = await storagetransfer.transferJobs.list({
|
|
1459
|
-
* // Required. A list of query parameters specified as JSON text in the form of: `{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...]\}` Since `jobNames` and `jobStatuses` support multiple values, their values must be specified with array notation. `projectId` is required. `jobNames` and `jobStatuses` are optional. The valid values for `jobStatuses` are case-insensitive: ENABLED, DISABLED, and DELETED.
|
|
1460
|
-
* filter: 'placeholder-value',
|
|
1461
|
-
* // The list page size. The max allowed value is 256.
|
|
1462
|
-
* pageSize: 'placeholder-value',
|
|
1463
|
-
* // The list page token.
|
|
1464
|
-
* pageToken: 'placeholder-value',
|
|
1465
|
-
* });
|
|
1466
|
-
* console.log(res.data);
|
|
1467
|
-
*
|
|
1468
|
-
* // Example response
|
|
1469
|
-
* // {
|
|
1470
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
1471
|
-
* // "transferJobs": []
|
|
1472
|
-
* // }
|
|
1473
|
-
* }
|
|
1474
|
-
*
|
|
1475
|
-
* main().catch(e => {
|
|
1476
|
-
* console.error(e);
|
|
1477
|
-
* throw e;
|
|
1478
|
-
* });
|
|
1479
|
-
*
|
|
1480
|
-
* ```
|
|
1481
1114
|
*
|
|
1482
1115
|
* @param params - Parameters for request
|
|
1483
1116
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1492,69 +1125,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1492
1125
|
list(callback: BodyResponseCallback<Schema$ListTransferJobsResponse>): void;
|
|
1493
1126
|
/**
|
|
1494
1127
|
* Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. **Note:** The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED).
|
|
1495
|
-
* @example
|
|
1496
|
-
* ```js
|
|
1497
|
-
* // Before running the sample:
|
|
1498
|
-
* // - Enable the API at:
|
|
1499
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1500
|
-
* // - Login into gcloud by running:
|
|
1501
|
-
* // `$ gcloud auth application-default login`
|
|
1502
|
-
* // - Install the npm module by running:
|
|
1503
|
-
* // `$ npm install googleapis`
|
|
1504
|
-
*
|
|
1505
|
-
* const {google} = require('googleapis');
|
|
1506
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1507
|
-
*
|
|
1508
|
-
* async function main() {
|
|
1509
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1510
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1511
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1512
|
-
* });
|
|
1513
|
-
*
|
|
1514
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1515
|
-
* const authClient = await auth.getClient();
|
|
1516
|
-
* google.options({auth: authClient});
|
|
1517
|
-
*
|
|
1518
|
-
* // Do the magic
|
|
1519
|
-
* const res = await storagetransfer.transferJobs.patch({
|
|
1520
|
-
* // Required. The name of job to update.
|
|
1521
|
-
* jobName: 'transferJobs/.*',
|
|
1522
|
-
*
|
|
1523
|
-
* // Request body metadata
|
|
1524
|
-
* requestBody: {
|
|
1525
|
-
* // request body parameters
|
|
1526
|
-
* // {
|
|
1527
|
-
* // "projectId": "my_projectId",
|
|
1528
|
-
* // "transferJob": {},
|
|
1529
|
-
* // "updateTransferJobFieldMask": "my_updateTransferJobFieldMask"
|
|
1530
|
-
* // }
|
|
1531
|
-
* },
|
|
1532
|
-
* });
|
|
1533
|
-
* console.log(res.data);
|
|
1534
|
-
*
|
|
1535
|
-
* // Example response
|
|
1536
|
-
* // {
|
|
1537
|
-
* // "creationTime": "my_creationTime",
|
|
1538
|
-
* // "deletionTime": "my_deletionTime",
|
|
1539
|
-
* // "description": "my_description",
|
|
1540
|
-
* // "lastModificationTime": "my_lastModificationTime",
|
|
1541
|
-
* // "latestOperationName": "my_latestOperationName",
|
|
1542
|
-
* // "loggingConfig": {},
|
|
1543
|
-
* // "name": "my_name",
|
|
1544
|
-
* // "notificationConfig": {},
|
|
1545
|
-
* // "projectId": "my_projectId",
|
|
1546
|
-
* // "schedule": {},
|
|
1547
|
-
* // "status": "my_status",
|
|
1548
|
-
* // "transferSpec": {}
|
|
1549
|
-
* // }
|
|
1550
|
-
* }
|
|
1551
|
-
*
|
|
1552
|
-
* main().catch(e => {
|
|
1553
|
-
* console.error(e);
|
|
1554
|
-
* throw e;
|
|
1555
|
-
* });
|
|
1556
|
-
*
|
|
1557
|
-
* ```
|
|
1558
1128
|
*
|
|
1559
1129
|
* @param params - Parameters for request
|
|
1560
1130
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1568,61 +1138,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
1568
1138
|
patch(params: Params$Resource$Transferjobs$Patch, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1569
1139
|
patch(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1570
1140
|
/**
|
|
1571
|
-
*
|
|
1572
|
-
* @example
|
|
1573
|
-
* ```js
|
|
1574
|
-
* // Before running the sample:
|
|
1575
|
-
* // - Enable the API at:
|
|
1576
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1577
|
-
* // - Login into gcloud by running:
|
|
1578
|
-
* // `$ gcloud auth application-default login`
|
|
1579
|
-
* // - Install the npm module by running:
|
|
1580
|
-
* // `$ npm install googleapis`
|
|
1581
|
-
*
|
|
1582
|
-
* const {google} = require('googleapis');
|
|
1583
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1584
|
-
*
|
|
1585
|
-
* async function main() {
|
|
1586
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1587
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1588
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1589
|
-
* });
|
|
1590
|
-
*
|
|
1591
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1592
|
-
* const authClient = await auth.getClient();
|
|
1593
|
-
* google.options({auth: authClient});
|
|
1594
|
-
*
|
|
1595
|
-
* // Do the magic
|
|
1596
|
-
* const res = await storagetransfer.transferJobs.run({
|
|
1597
|
-
* // Required. The name of the transfer job.
|
|
1598
|
-
* jobName: 'transferJobs/.*',
|
|
1599
|
-
*
|
|
1600
|
-
* // Request body metadata
|
|
1601
|
-
* requestBody: {
|
|
1602
|
-
* // request body parameters
|
|
1603
|
-
* // {
|
|
1604
|
-
* // "projectId": "my_projectId"
|
|
1605
|
-
* // }
|
|
1606
|
-
* },
|
|
1607
|
-
* });
|
|
1608
|
-
* console.log(res.data);
|
|
1609
|
-
*
|
|
1610
|
-
* // Example response
|
|
1611
|
-
* // {
|
|
1612
|
-
* // "done": false,
|
|
1613
|
-
* // "error": {},
|
|
1614
|
-
* // "metadata": {},
|
|
1615
|
-
* // "name": "my_name",
|
|
1616
|
-
* // "response": {}
|
|
1617
|
-
* // }
|
|
1618
|
-
* }
|
|
1619
|
-
*
|
|
1620
|
-
* main().catch(e => {
|
|
1621
|
-
* console.error(e);
|
|
1622
|
-
* throw e;
|
|
1623
|
-
* });
|
|
1624
|
-
*
|
|
1625
|
-
* ```
|
|
1141
|
+
* Starts a new operation for the specified transfer job. A `TransferJob` has a maximum of one active `TransferOperation`. If this method is called while a `TransferOperation` is active, an error is returned.
|
|
1626
1142
|
*
|
|
1627
1143
|
* @param params - Parameters for request
|
|
1628
1144
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1642,6 +1158,16 @@ export declare namespace storagetransfer_v1 {
|
|
|
1642
1158
|
*/
|
|
1643
1159
|
requestBody?: Schema$TransferJob;
|
|
1644
1160
|
}
|
|
1161
|
+
export interface Params$Resource$Transferjobs$Delete extends StandardParameters {
|
|
1162
|
+
/**
|
|
1163
|
+
* Required. The job to delete.
|
|
1164
|
+
*/
|
|
1165
|
+
jobName?: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* Required. The ID of the Google Cloud project that owns the job.
|
|
1168
|
+
*/
|
|
1169
|
+
projectId?: string;
|
|
1170
|
+
}
|
|
1645
1171
|
export interface Params$Resource$Transferjobs$Get extends StandardParameters {
|
|
1646
1172
|
/**
|
|
1647
1173
|
* Required. The job to get.
|
|
@@ -1691,52 +1217,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1691
1217
|
constructor(context: APIRequestContext);
|
|
1692
1218
|
/**
|
|
1693
1219
|
* Cancels a transfer. Use the transferOperations.get method to check if the cancellation succeeded or if the operation completed despite the `cancel` request. When you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday. This applies only to currently running operations. If an operation is not currently running, `cancel` does nothing. *Caution:* Canceling a transfer job can leave your data in an unknown state. We recommend that you restore the state at both the destination and the source after the `cancel` request completes so that your data is in a consistent state. When you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.
|
|
1694
|
-
* @example
|
|
1695
|
-
* ```js
|
|
1696
|
-
* // Before running the sample:
|
|
1697
|
-
* // - Enable the API at:
|
|
1698
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1699
|
-
* // - Login into gcloud by running:
|
|
1700
|
-
* // `$ gcloud auth application-default login`
|
|
1701
|
-
* // - Install the npm module by running:
|
|
1702
|
-
* // `$ npm install googleapis`
|
|
1703
|
-
*
|
|
1704
|
-
* const {google} = require('googleapis');
|
|
1705
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1706
|
-
*
|
|
1707
|
-
* async function main() {
|
|
1708
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1709
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1710
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1711
|
-
* });
|
|
1712
|
-
*
|
|
1713
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1714
|
-
* const authClient = await auth.getClient();
|
|
1715
|
-
* google.options({auth: authClient});
|
|
1716
|
-
*
|
|
1717
|
-
* // Do the magic
|
|
1718
|
-
* const res = await storagetransfer.transferOperations.cancel({
|
|
1719
|
-
* // The name of the operation resource to be cancelled.
|
|
1720
|
-
* name: 'transferOperations/.*',
|
|
1721
|
-
*
|
|
1722
|
-
* // Request body metadata
|
|
1723
|
-
* requestBody: {
|
|
1724
|
-
* // request body parameters
|
|
1725
|
-
* // {}
|
|
1726
|
-
* },
|
|
1727
|
-
* });
|
|
1728
|
-
* console.log(res.data);
|
|
1729
|
-
*
|
|
1730
|
-
* // Example response
|
|
1731
|
-
* // {}
|
|
1732
|
-
* }
|
|
1733
|
-
*
|
|
1734
|
-
* main().catch(e => {
|
|
1735
|
-
* console.error(e);
|
|
1736
|
-
* throw e;
|
|
1737
|
-
* });
|
|
1738
|
-
*
|
|
1739
|
-
* ```
|
|
1740
1220
|
*
|
|
1741
1221
|
* @param params - Parameters for request
|
|
1742
1222
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1751,52 +1231,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1751
1231
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1752
1232
|
/**
|
|
1753
1233
|
* 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.
|
|
1754
|
-
* @example
|
|
1755
|
-
* ```js
|
|
1756
|
-
* // Before running the sample:
|
|
1757
|
-
* // - Enable the API at:
|
|
1758
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1759
|
-
* // - Login into gcloud by running:
|
|
1760
|
-
* // `$ gcloud auth application-default login`
|
|
1761
|
-
* // - Install the npm module by running:
|
|
1762
|
-
* // `$ npm install googleapis`
|
|
1763
|
-
*
|
|
1764
|
-
* const {google} = require('googleapis');
|
|
1765
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1766
|
-
*
|
|
1767
|
-
* async function main() {
|
|
1768
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1769
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1770
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1771
|
-
* });
|
|
1772
|
-
*
|
|
1773
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1774
|
-
* const authClient = await auth.getClient();
|
|
1775
|
-
* google.options({auth: authClient});
|
|
1776
|
-
*
|
|
1777
|
-
* // Do the magic
|
|
1778
|
-
* const res = await storagetransfer.transferOperations.get({
|
|
1779
|
-
* // The name of the operation resource.
|
|
1780
|
-
* name: 'transferOperations/.*',
|
|
1781
|
-
* });
|
|
1782
|
-
* console.log(res.data);
|
|
1783
|
-
*
|
|
1784
|
-
* // Example response
|
|
1785
|
-
* // {
|
|
1786
|
-
* // "done": false,
|
|
1787
|
-
* // "error": {},
|
|
1788
|
-
* // "metadata": {},
|
|
1789
|
-
* // "name": "my_name",
|
|
1790
|
-
* // "response": {}
|
|
1791
|
-
* // }
|
|
1792
|
-
* }
|
|
1793
|
-
*
|
|
1794
|
-
* main().catch(e => {
|
|
1795
|
-
* console.error(e);
|
|
1796
|
-
* throw e;
|
|
1797
|
-
* });
|
|
1798
|
-
*
|
|
1799
|
-
* ```
|
|
1800
1234
|
*
|
|
1801
1235
|
* @param params - Parameters for request
|
|
1802
1236
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1811,55 +1245,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1811
1245
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1812
1246
|
/**
|
|
1813
1247
|
* Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.
|
|
1814
|
-
* @example
|
|
1815
|
-
* ```js
|
|
1816
|
-
* // Before running the sample:
|
|
1817
|
-
* // - Enable the API at:
|
|
1818
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1819
|
-
* // - Login into gcloud by running:
|
|
1820
|
-
* // `$ gcloud auth application-default login`
|
|
1821
|
-
* // - Install the npm module by running:
|
|
1822
|
-
* // `$ npm install googleapis`
|
|
1823
|
-
*
|
|
1824
|
-
* const {google} = require('googleapis');
|
|
1825
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1826
|
-
*
|
|
1827
|
-
* async function main() {
|
|
1828
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1829
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1830
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1831
|
-
* });
|
|
1832
|
-
*
|
|
1833
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1834
|
-
* const authClient = await auth.getClient();
|
|
1835
|
-
* google.options({auth: authClient});
|
|
1836
|
-
*
|
|
1837
|
-
* // Do the magic
|
|
1838
|
-
* const res = await storagetransfer.transferOperations.list({
|
|
1839
|
-
* // Required. A list of query parameters specified as JSON text in the form of: `{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "operationNames":["opid1","opid2",...], "transferStatuses":["status1","status2",...]\}` Since `jobNames`, `operationNames`, and `transferStatuses` support multiple values, they must be specified with array notation. `projectId` is required. `jobNames`, `operationNames`, and `transferStatuses` are optional. The valid values for `transferStatuses` are case-insensitive: IN_PROGRESS, PAUSED, SUCCESS, FAILED, and ABORTED.
|
|
1840
|
-
* filter: 'placeholder-value',
|
|
1841
|
-
* // Required. The name of the type being listed; must be `transferOperations`.
|
|
1842
|
-
* name: 'transferOperations',
|
|
1843
|
-
* // The list page size. The max allowed value is 256.
|
|
1844
|
-
* pageSize: 'placeholder-value',
|
|
1845
|
-
* // The list page token.
|
|
1846
|
-
* pageToken: 'placeholder-value',
|
|
1847
|
-
* });
|
|
1848
|
-
* console.log(res.data);
|
|
1849
|
-
*
|
|
1850
|
-
* // Example response
|
|
1851
|
-
* // {
|
|
1852
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
1853
|
-
* // "operations": []
|
|
1854
|
-
* // }
|
|
1855
|
-
* }
|
|
1856
|
-
*
|
|
1857
|
-
* main().catch(e => {
|
|
1858
|
-
* console.error(e);
|
|
1859
|
-
* throw e;
|
|
1860
|
-
* });
|
|
1861
|
-
*
|
|
1862
|
-
* ```
|
|
1863
1248
|
*
|
|
1864
1249
|
* @param params - Parameters for request
|
|
1865
1250
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1874,52 +1259,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1874
1259
|
list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
1875
1260
|
/**
|
|
1876
1261
|
* Pauses a transfer operation.
|
|
1877
|
-
* @example
|
|
1878
|
-
* ```js
|
|
1879
|
-
* // Before running the sample:
|
|
1880
|
-
* // - Enable the API at:
|
|
1881
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1882
|
-
* // - Login into gcloud by running:
|
|
1883
|
-
* // `$ gcloud auth application-default login`
|
|
1884
|
-
* // - Install the npm module by running:
|
|
1885
|
-
* // `$ npm install googleapis`
|
|
1886
|
-
*
|
|
1887
|
-
* const {google} = require('googleapis');
|
|
1888
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1889
|
-
*
|
|
1890
|
-
* async function main() {
|
|
1891
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1892
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1893
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1894
|
-
* });
|
|
1895
|
-
*
|
|
1896
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1897
|
-
* const authClient = await auth.getClient();
|
|
1898
|
-
* google.options({auth: authClient});
|
|
1899
|
-
*
|
|
1900
|
-
* // Do the magic
|
|
1901
|
-
* const res = await storagetransfer.transferOperations.pause({
|
|
1902
|
-
* // Required. The name of the transfer operation.
|
|
1903
|
-
* name: 'transferOperations/.*',
|
|
1904
|
-
*
|
|
1905
|
-
* // Request body metadata
|
|
1906
|
-
* requestBody: {
|
|
1907
|
-
* // request body parameters
|
|
1908
|
-
* // {}
|
|
1909
|
-
* },
|
|
1910
|
-
* });
|
|
1911
|
-
* console.log(res.data);
|
|
1912
|
-
*
|
|
1913
|
-
* // Example response
|
|
1914
|
-
* // {}
|
|
1915
|
-
* }
|
|
1916
|
-
*
|
|
1917
|
-
* main().catch(e => {
|
|
1918
|
-
* console.error(e);
|
|
1919
|
-
* throw e;
|
|
1920
|
-
* });
|
|
1921
|
-
*
|
|
1922
|
-
* ```
|
|
1923
1262
|
*
|
|
1924
1263
|
* @param params - Parameters for request
|
|
1925
1264
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1934,52 +1273,6 @@ export declare namespace storagetransfer_v1 {
|
|
|
1934
1273
|
pause(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1935
1274
|
/**
|
|
1936
1275
|
* Resumes a transfer operation that is paused.
|
|
1937
|
-
* @example
|
|
1938
|
-
* ```js
|
|
1939
|
-
* // Before running the sample:
|
|
1940
|
-
* // - Enable the API at:
|
|
1941
|
-
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1942
|
-
* // - Login into gcloud by running:
|
|
1943
|
-
* // `$ gcloud auth application-default login`
|
|
1944
|
-
* // - Install the npm module by running:
|
|
1945
|
-
* // `$ npm install googleapis`
|
|
1946
|
-
*
|
|
1947
|
-
* const {google} = require('googleapis');
|
|
1948
|
-
* const storagetransfer = google.storagetransfer('v1');
|
|
1949
|
-
*
|
|
1950
|
-
* async function main() {
|
|
1951
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1952
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1953
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1954
|
-
* });
|
|
1955
|
-
*
|
|
1956
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1957
|
-
* const authClient = await auth.getClient();
|
|
1958
|
-
* google.options({auth: authClient});
|
|
1959
|
-
*
|
|
1960
|
-
* // Do the magic
|
|
1961
|
-
* const res = await storagetransfer.transferOperations.resume({
|
|
1962
|
-
* // Required. The name of the transfer operation.
|
|
1963
|
-
* name: 'transferOperations/.*',
|
|
1964
|
-
*
|
|
1965
|
-
* // Request body metadata
|
|
1966
|
-
* requestBody: {
|
|
1967
|
-
* // request body parameters
|
|
1968
|
-
* // {}
|
|
1969
|
-
* },
|
|
1970
|
-
* });
|
|
1971
|
-
* console.log(res.data);
|
|
1972
|
-
*
|
|
1973
|
-
* // Example response
|
|
1974
|
-
* // {}
|
|
1975
|
-
* }
|
|
1976
|
-
*
|
|
1977
|
-
* main().catch(e => {
|
|
1978
|
-
* console.error(e);
|
|
1979
|
-
* throw e;
|
|
1980
|
-
* });
|
|
1981
|
-
*
|
|
1982
|
-
* ```
|
|
1983
1276
|
*
|
|
1984
1277
|
* @param params - Parameters for request
|
|
1985
1278
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|