@googleapis/storagetransfer 4.0.0 → 4.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/build/v1.d.ts CHANGED
@@ -145,6 +145,10 @@ export declare namespace storagetransfer_v1 {
145
145
  * Required. S3 Bucket name (see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
146
146
  */
147
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;
148
152
  /**
149
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 '/'.
150
154
  */
@@ -166,6 +170,10 @@ export declare namespace storagetransfer_v1 {
166
170
  * Required. The container to transfer from the Azure Storage account.
167
171
  */
168
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;
169
177
  /**
170
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 '/'.
171
179
  */
@@ -250,6 +258,23 @@ export declare namespace storagetransfer_v1 {
250
258
  */
251
259
  errorLogEntries?: Schema$ErrorLogEntry[];
252
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
+ }
253
278
  /**
254
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.
255
280
  */
@@ -451,7 +476,7 @@ export declare namespace storagetransfer_v1 {
451
476
  */
452
477
  name?: string | null;
453
478
  /**
454
- * The normal response of the operation in case of success. 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`.
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`.
455
480
  */
456
481
  response?: {
457
482
  [key: string]: any;
@@ -676,6 +701,10 @@ export declare namespace storagetransfer_v1 {
676
701
  * A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.
677
702
  */
678
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;
679
708
  /**
680
709
  * Output only. The time that the transfer job was last modified.
681
710
  */
@@ -738,6 +767,10 @@ export declare namespace storagetransfer_v1 {
738
767
  * Summarizes errors encountered with sample error log entries.
739
768
  */
740
769
  errorBreakdowns?: Schema$ErrorSummary[];
770
+ /**
771
+ * Cloud Logging configuration.
772
+ */
773
+ loggingConfig?: Schema$LoggingConfig;
741
774
  /**
742
775
  * A globally unique ID assigned by the system.
743
776
  */
@@ -817,7 +850,7 @@ export declare namespace storagetransfer_v1 {
817
850
  */
818
851
  gcsDataSource?: Schema$GcsData;
819
852
  /**
820
- * Cloud Storage intermediate data location.
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.
821
854
  */
822
855
  gcsIntermediateDataLocation?: Schema$GcsData;
823
856
  /**
@@ -875,49 +908,6 @@ export declare namespace storagetransfer_v1 {
875
908
  constructor(context: APIRequestContext);
876
909
  /**
877
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.
878
- * @example
879
- * ```js
880
- * // Before running the sample:
881
- * // - Enable the API at:
882
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
883
- * // - Login into gcloud by running:
884
- * // `$ gcloud auth application-default login`
885
- * // - Install the npm module by running:
886
- * // `$ npm install googleapis`
887
- *
888
- * const {google} = require('googleapis');
889
- * const storagetransfer = google.storagetransfer('v1');
890
- *
891
- * async function main() {
892
- * const auth = new google.auth.GoogleAuth({
893
- * // Scopes can be specified either as an array or as a single, space-delimited string.
894
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
895
- * });
896
- *
897
- * // Acquire an auth client, and bind it to all future calls
898
- * const authClient = await auth.getClient();
899
- * google.options({auth: authClient});
900
- *
901
- * // Do the magic
902
- * const res = await storagetransfer.googleServiceAccounts.get({
903
- * // Required. The ID of the Google Cloud project that the Google service account is associated with.
904
- * projectId: 'placeholder-value',
905
- * });
906
- * console.log(res.data);
907
- *
908
- * // Example response
909
- * // {
910
- * // "accountEmail": "my_accountEmail",
911
- * // "subjectId": "my_subjectId"
912
- * // }
913
- * }
914
- *
915
- * main().catch(e => {
916
- * console.error(e);
917
- * throw e;
918
- * });
919
- *
920
- * ```
921
911
  *
922
912
  * @param params - Parameters for request
923
913
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -947,64 +937,6 @@ export declare namespace storagetransfer_v1 {
947
937
  constructor(context: APIRequestContext);
948
938
  /**
949
939
  * Creates an agent pool resource.
950
- * @example
951
- * ```js
952
- * // Before running the sample:
953
- * // - Enable the API at:
954
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
955
- * // - Login into gcloud by running:
956
- * // `$ gcloud auth application-default login`
957
- * // - Install the npm module by running:
958
- * // `$ npm install googleapis`
959
- *
960
- * const {google} = require('googleapis');
961
- * const storagetransfer = google.storagetransfer('v1');
962
- *
963
- * async function main() {
964
- * const auth = new google.auth.GoogleAuth({
965
- * // Scopes can be specified either as an array or as a single, space-delimited string.
966
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
967
- * });
968
- *
969
- * // Acquire an auth client, and bind it to all future calls
970
- * const authClient = await auth.getClient();
971
- * google.options({auth: authClient});
972
- *
973
- * // Do the magic
974
- * const res = await storagetransfer.projects.agentPools.create({
975
- * // 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])?$`.
976
- * agentPoolId: 'placeholder-value',
977
- * // Required. The ID of the Google Cloud project that owns the agent pool.
978
- * projectId: '[^/]+',
979
- *
980
- * // Request body metadata
981
- * requestBody: {
982
- * // request body parameters
983
- * // {
984
- * // "bandwidthLimit": {},
985
- * // "displayName": "my_displayName",
986
- * // "name": "my_name",
987
- * // "state": "my_state"
988
- * // }
989
- * },
990
- * });
991
- * console.log(res.data);
992
- *
993
- * // Example response
994
- * // {
995
- * // "bandwidthLimit": {},
996
- * // "displayName": "my_displayName",
997
- * // "name": "my_name",
998
- * // "state": "my_state"
999
- * // }
1000
- * }
1001
- *
1002
- * main().catch(e => {
1003
- * console.error(e);
1004
- * throw e;
1005
- * });
1006
- *
1007
- * ```
1008
940
  *
1009
941
  * @param params - Parameters for request
1010
942
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1019,46 +951,6 @@ export declare namespace storagetransfer_v1 {
1019
951
  create(callback: BodyResponseCallback<Schema$AgentPool>): void;
1020
952
  /**
1021
953
  * Deletes an agent pool.
1022
- * @example
1023
- * ```js
1024
- * // Before running the sample:
1025
- * // - Enable the API at:
1026
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1027
- * // - Login into gcloud by running:
1028
- * // `$ gcloud auth application-default login`
1029
- * // - Install the npm module by running:
1030
- * // `$ npm install googleapis`
1031
- *
1032
- * const {google} = require('googleapis');
1033
- * const storagetransfer = google.storagetransfer('v1');
1034
- *
1035
- * async function main() {
1036
- * const auth = new google.auth.GoogleAuth({
1037
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1038
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1039
- * });
1040
- *
1041
- * // Acquire an auth client, and bind it to all future calls
1042
- * const authClient = await auth.getClient();
1043
- * google.options({auth: authClient});
1044
- *
1045
- * // Do the magic
1046
- * const res = await storagetransfer.projects.agentPools.delete({
1047
- * // Required. The name of the agent pool to delete.
1048
- * name: 'projects/my-project/agentPools/my-agentPool',
1049
- * });
1050
- * console.log(res.data);
1051
- *
1052
- * // Example response
1053
- * // {}
1054
- * }
1055
- *
1056
- * main().catch(e => {
1057
- * console.error(e);
1058
- * throw e;
1059
- * });
1060
- *
1061
- * ```
1062
954
  *
1063
955
  * @param params - Parameters for request
1064
956
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1073,51 +965,6 @@ export declare namespace storagetransfer_v1 {
1073
965
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
1074
966
  /**
1075
967
  * Gets an agent pool.
1076
- * @example
1077
- * ```js
1078
- * // Before running the sample:
1079
- * // - Enable the API at:
1080
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1081
- * // - Login into gcloud by running:
1082
- * // `$ gcloud auth application-default login`
1083
- * // - Install the npm module by running:
1084
- * // `$ npm install googleapis`
1085
- *
1086
- * const {google} = require('googleapis');
1087
- * const storagetransfer = google.storagetransfer('v1');
1088
- *
1089
- * async function main() {
1090
- * const auth = new google.auth.GoogleAuth({
1091
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1092
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1093
- * });
1094
- *
1095
- * // Acquire an auth client, and bind it to all future calls
1096
- * const authClient = await auth.getClient();
1097
- * google.options({auth: authClient});
1098
- *
1099
- * // Do the magic
1100
- * const res = await storagetransfer.projects.agentPools.get({
1101
- * // Required. The name of the agent pool to get.
1102
- * name: 'projects/my-project/agentPools/my-agentPool',
1103
- * });
1104
- * console.log(res.data);
1105
- *
1106
- * // Example response
1107
- * // {
1108
- * // "bandwidthLimit": {},
1109
- * // "displayName": "my_displayName",
1110
- * // "name": "my_name",
1111
- * // "state": "my_state"
1112
- * // }
1113
- * }
1114
- *
1115
- * main().catch(e => {
1116
- * console.error(e);
1117
- * throw e;
1118
- * });
1119
- *
1120
- * ```
1121
968
  *
1122
969
  * @param params - Parameters for request
1123
970
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1132,55 +979,6 @@ export declare namespace storagetransfer_v1 {
1132
979
  get(callback: BodyResponseCallback<Schema$AgentPool>): void;
1133
980
  /**
1134
981
  * Lists agent pools.
1135
- * @example
1136
- * ```js
1137
- * // Before running the sample:
1138
- * // - Enable the API at:
1139
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1140
- * // - Login into gcloud by running:
1141
- * // `$ gcloud auth application-default login`
1142
- * // - Install the npm module by running:
1143
- * // `$ npm install googleapis`
1144
- *
1145
- * const {google} = require('googleapis');
1146
- * const storagetransfer = google.storagetransfer('v1');
1147
- *
1148
- * async function main() {
1149
- * const auth = new google.auth.GoogleAuth({
1150
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1151
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1152
- * });
1153
- *
1154
- * // Acquire an auth client, and bind it to all future calls
1155
- * const authClient = await auth.getClient();
1156
- * google.options({auth: authClient});
1157
- *
1158
- * // Do the magic
1159
- * const res = await storagetransfer.projects.agentPools.list({
1160
- * // 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.
1161
- * filter: 'placeholder-value',
1162
- * // The list page size. The max allowed value is `256`.
1163
- * pageSize: 'placeholder-value',
1164
- * // The list page token.
1165
- * pageToken: 'placeholder-value',
1166
- * // Required. The ID of the Google Cloud project that owns the job.
1167
- * projectId: '[^/]+',
1168
- * });
1169
- * console.log(res.data);
1170
- *
1171
- * // Example response
1172
- * // {
1173
- * // "agentPools": [],
1174
- * // "nextPageToken": "my_nextPageToken"
1175
- * // }
1176
- * }
1177
- *
1178
- * main().catch(e => {
1179
- * console.error(e);
1180
- * throw e;
1181
- * });
1182
- *
1183
- * ```
1184
982
  *
1185
983
  * @param params - Parameters for request
1186
984
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1195,64 +993,6 @@ export declare namespace storagetransfer_v1 {
1195
993
  list(callback: BodyResponseCallback<Schema$ListAgentPoolsResponse>): void;
1196
994
  /**
1197
995
  * Updates an existing agent pool resource.
1198
- * @example
1199
- * ```js
1200
- * // Before running the sample:
1201
- * // - Enable the API at:
1202
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1203
- * // - Login into gcloud by running:
1204
- * // `$ gcloud auth application-default login`
1205
- * // - Install the npm module by running:
1206
- * // `$ npm install googleapis`
1207
- *
1208
- * const {google} = require('googleapis');
1209
- * const storagetransfer = google.storagetransfer('v1');
1210
- *
1211
- * async function main() {
1212
- * const auth = new google.auth.GoogleAuth({
1213
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1214
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1215
- * });
1216
- *
1217
- * // Acquire an auth client, and bind it to all future calls
1218
- * const authClient = await auth.getClient();
1219
- * google.options({auth: authClient});
1220
- *
1221
- * // Do the magic
1222
- * const res = await storagetransfer.projects.agentPools.patch({
1223
- * // Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id\}/agentPools/{agent_pool_id\}`
1224
- * name: 'projects/my-project/agentPools/my-agentPool',
1225
- * // 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
1226
- * updateMask: 'placeholder-value',
1227
- *
1228
- * // Request body metadata
1229
- * requestBody: {
1230
- * // request body parameters
1231
- * // {
1232
- * // "bandwidthLimit": {},
1233
- * // "displayName": "my_displayName",
1234
- * // "name": "my_name",
1235
- * // "state": "my_state"
1236
- * // }
1237
- * },
1238
- * });
1239
- * console.log(res.data);
1240
- *
1241
- * // Example response
1242
- * // {
1243
- * // "bandwidthLimit": {},
1244
- * // "displayName": "my_displayName",
1245
- * // "name": "my_name",
1246
- * // "state": "my_state"
1247
- * // }
1248
- * }
1249
- *
1250
- * main().catch(e => {
1251
- * console.error(e);
1252
- * throw e;
1253
- * });
1254
- *
1255
- * ```
1256
996
  *
1257
997
  * @param params - Parameters for request
1258
998
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1329,75 +1069,6 @@ export declare namespace storagetransfer_v1 {
1329
1069
  constructor(context: APIRequestContext);
1330
1070
  /**
1331
1071
  * Creates a transfer job that runs periodically.
1332
- * @example
1333
- * ```js
1334
- * // Before running the sample:
1335
- * // - Enable the API at:
1336
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1337
- * // - Login into gcloud by running:
1338
- * // `$ gcloud auth application-default login`
1339
- * // - Install the npm module by running:
1340
- * // `$ npm install googleapis`
1341
- *
1342
- * const {google} = require('googleapis');
1343
- * const storagetransfer = google.storagetransfer('v1');
1344
- *
1345
- * async function main() {
1346
- * const auth = new google.auth.GoogleAuth({
1347
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1348
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1349
- * });
1350
- *
1351
- * // Acquire an auth client, and bind it to all future calls
1352
- * const authClient = await auth.getClient();
1353
- * google.options({auth: authClient});
1354
- *
1355
- * // Do the magic
1356
- * const res = await storagetransfer.transferJobs.create({
1357
- * // Request body metadata
1358
- * requestBody: {
1359
- * // request body parameters
1360
- * // {
1361
- * // "creationTime": "my_creationTime",
1362
- * // "deletionTime": "my_deletionTime",
1363
- * // "description": "my_description",
1364
- * // "lastModificationTime": "my_lastModificationTime",
1365
- * // "latestOperationName": "my_latestOperationName",
1366
- * // "loggingConfig": {},
1367
- * // "name": "my_name",
1368
- * // "notificationConfig": {},
1369
- * // "projectId": "my_projectId",
1370
- * // "schedule": {},
1371
- * // "status": "my_status",
1372
- * // "transferSpec": {}
1373
- * // }
1374
- * },
1375
- * });
1376
- * console.log(res.data);
1377
- *
1378
- * // Example response
1379
- * // {
1380
- * // "creationTime": "my_creationTime",
1381
- * // "deletionTime": "my_deletionTime",
1382
- * // "description": "my_description",
1383
- * // "lastModificationTime": "my_lastModificationTime",
1384
- * // "latestOperationName": "my_latestOperationName",
1385
- * // "loggingConfig": {},
1386
- * // "name": "my_name",
1387
- * // "notificationConfig": {},
1388
- * // "projectId": "my_projectId",
1389
- * // "schedule": {},
1390
- * // "status": "my_status",
1391
- * // "transferSpec": {}
1392
- * // }
1393
- * }
1394
- *
1395
- * main().catch(e => {
1396
- * console.error(e);
1397
- * throw e;
1398
- * });
1399
- *
1400
- * ```
1401
1072
  *
1402
1073
  * @param params - Parameters for request
1403
1074
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1412,48 +1083,6 @@ export declare namespace storagetransfer_v1 {
1412
1083
  create(callback: BodyResponseCallback<Schema$TransferJob>): void;
1413
1084
  /**
1414
1085
  * Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
1415
- * @example
1416
- * ```js
1417
- * // Before running the sample:
1418
- * // - Enable the API at:
1419
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1420
- * // - Login into gcloud by running:
1421
- * // `$ gcloud auth application-default login`
1422
- * // - Install the npm module by running:
1423
- * // `$ npm install googleapis`
1424
- *
1425
- * const {google} = require('googleapis');
1426
- * const storagetransfer = google.storagetransfer('v1');
1427
- *
1428
- * async function main() {
1429
- * const auth = new google.auth.GoogleAuth({
1430
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1431
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1432
- * });
1433
- *
1434
- * // Acquire an auth client, and bind it to all future calls
1435
- * const authClient = await auth.getClient();
1436
- * google.options({auth: authClient});
1437
- *
1438
- * // Do the magic
1439
- * const res = await storagetransfer.transferJobs.delete({
1440
- * // Required. The job to delete.
1441
- * jobName: 'transferJobs/.*',
1442
- * // Required. The ID of the Google Cloud project that owns the job.
1443
- * projectId: 'placeholder-value',
1444
- * });
1445
- * console.log(res.data);
1446
- *
1447
- * // Example response
1448
- * // {}
1449
- * }
1450
- *
1451
- * main().catch(e => {
1452
- * console.error(e);
1453
- * throw e;
1454
- * });
1455
- *
1456
- * ```
1457
1086
  *
1458
1087
  * @param params - Parameters for request
1459
1088
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1468,61 +1097,6 @@ export declare namespace storagetransfer_v1 {
1468
1097
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
1469
1098
  /**
1470
1099
  * Gets a transfer job.
1471
- * @example
1472
- * ```js
1473
- * // Before running the sample:
1474
- * // - Enable the API at:
1475
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1476
- * // - Login into gcloud by running:
1477
- * // `$ gcloud auth application-default login`
1478
- * // - Install the npm module by running:
1479
- * // `$ npm install googleapis`
1480
- *
1481
- * const {google} = require('googleapis');
1482
- * const storagetransfer = google.storagetransfer('v1');
1483
- *
1484
- * async function main() {
1485
- * const auth = new google.auth.GoogleAuth({
1486
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1487
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1488
- * });
1489
- *
1490
- * // Acquire an auth client, and bind it to all future calls
1491
- * const authClient = await auth.getClient();
1492
- * google.options({auth: authClient});
1493
- *
1494
- * // Do the magic
1495
- * const res = await storagetransfer.transferJobs.get({
1496
- * // Required. The job to get.
1497
- * jobName: 'transferJobs/.*',
1498
- * // Required. The ID of the Google Cloud project that owns the job.
1499
- * projectId: 'placeholder-value',
1500
- * });
1501
- * console.log(res.data);
1502
- *
1503
- * // Example response
1504
- * // {
1505
- * // "creationTime": "my_creationTime",
1506
- * // "deletionTime": "my_deletionTime",
1507
- * // "description": "my_description",
1508
- * // "lastModificationTime": "my_lastModificationTime",
1509
- * // "latestOperationName": "my_latestOperationName",
1510
- * // "loggingConfig": {},
1511
- * // "name": "my_name",
1512
- * // "notificationConfig": {},
1513
- * // "projectId": "my_projectId",
1514
- * // "schedule": {},
1515
- * // "status": "my_status",
1516
- * // "transferSpec": {}
1517
- * // }
1518
- * }
1519
- *
1520
- * main().catch(e => {
1521
- * console.error(e);
1522
- * throw e;
1523
- * });
1524
- *
1525
- * ```
1526
1100
  *
1527
1101
  * @param params - Parameters for request
1528
1102
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1537,53 +1111,6 @@ export declare namespace storagetransfer_v1 {
1537
1111
  get(callback: BodyResponseCallback<Schema$TransferJob>): void;
1538
1112
  /**
1539
1113
  * Lists transfer jobs.
1540
- * @example
1541
- * ```js
1542
- * // Before running the sample:
1543
- * // - Enable the API at:
1544
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1545
- * // - Login into gcloud by running:
1546
- * // `$ gcloud auth application-default login`
1547
- * // - Install the npm module by running:
1548
- * // `$ npm install googleapis`
1549
- *
1550
- * const {google} = require('googleapis');
1551
- * const storagetransfer = google.storagetransfer('v1');
1552
- *
1553
- * async function main() {
1554
- * const auth = new google.auth.GoogleAuth({
1555
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1556
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1557
- * });
1558
- *
1559
- * // Acquire an auth client, and bind it to all future calls
1560
- * const authClient = await auth.getClient();
1561
- * google.options({auth: authClient});
1562
- *
1563
- * // Do the magic
1564
- * const res = await storagetransfer.transferJobs.list({
1565
- * // 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.
1566
- * filter: 'placeholder-value',
1567
- * // The list page size. The max allowed value is 256.
1568
- * pageSize: 'placeholder-value',
1569
- * // The list page token.
1570
- * pageToken: 'placeholder-value',
1571
- * });
1572
- * console.log(res.data);
1573
- *
1574
- * // Example response
1575
- * // {
1576
- * // "nextPageToken": "my_nextPageToken",
1577
- * // "transferJobs": []
1578
- * // }
1579
- * }
1580
- *
1581
- * main().catch(e => {
1582
- * console.error(e);
1583
- * throw e;
1584
- * });
1585
- *
1586
- * ```
1587
1114
  *
1588
1115
  * @param params - Parameters for request
1589
1116
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1598,69 +1125,6 @@ export declare namespace storagetransfer_v1 {
1598
1125
  list(callback: BodyResponseCallback<Schema$ListTransferJobsResponse>): void;
1599
1126
  /**
1600
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).
1601
- * @example
1602
- * ```js
1603
- * // Before running the sample:
1604
- * // - Enable the API at:
1605
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1606
- * // - Login into gcloud by running:
1607
- * // `$ gcloud auth application-default login`
1608
- * // - Install the npm module by running:
1609
- * // `$ npm install googleapis`
1610
- *
1611
- * const {google} = require('googleapis');
1612
- * const storagetransfer = google.storagetransfer('v1');
1613
- *
1614
- * async function main() {
1615
- * const auth = new google.auth.GoogleAuth({
1616
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1617
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1618
- * });
1619
- *
1620
- * // Acquire an auth client, and bind it to all future calls
1621
- * const authClient = await auth.getClient();
1622
- * google.options({auth: authClient});
1623
- *
1624
- * // Do the magic
1625
- * const res = await storagetransfer.transferJobs.patch({
1626
- * // Required. The name of job to update.
1627
- * jobName: 'transferJobs/.*',
1628
- *
1629
- * // Request body metadata
1630
- * requestBody: {
1631
- * // request body parameters
1632
- * // {
1633
- * // "projectId": "my_projectId",
1634
- * // "transferJob": {},
1635
- * // "updateTransferJobFieldMask": "my_updateTransferJobFieldMask"
1636
- * // }
1637
- * },
1638
- * });
1639
- * console.log(res.data);
1640
- *
1641
- * // Example response
1642
- * // {
1643
- * // "creationTime": "my_creationTime",
1644
- * // "deletionTime": "my_deletionTime",
1645
- * // "description": "my_description",
1646
- * // "lastModificationTime": "my_lastModificationTime",
1647
- * // "latestOperationName": "my_latestOperationName",
1648
- * // "loggingConfig": {},
1649
- * // "name": "my_name",
1650
- * // "notificationConfig": {},
1651
- * // "projectId": "my_projectId",
1652
- * // "schedule": {},
1653
- * // "status": "my_status",
1654
- * // "transferSpec": {}
1655
- * // }
1656
- * }
1657
- *
1658
- * main().catch(e => {
1659
- * console.error(e);
1660
- * throw e;
1661
- * });
1662
- *
1663
- * ```
1664
1128
  *
1665
1129
  * @param params - Parameters for request
1666
1130
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1675,60 +1139,6 @@ export declare namespace storagetransfer_v1 {
1675
1139
  patch(callback: BodyResponseCallback<Schema$TransferJob>): void;
1676
1140
  /**
1677
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.
1678
- * @example
1679
- * ```js
1680
- * // Before running the sample:
1681
- * // - Enable the API at:
1682
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1683
- * // - Login into gcloud by running:
1684
- * // `$ gcloud auth application-default login`
1685
- * // - Install the npm module by running:
1686
- * // `$ npm install googleapis`
1687
- *
1688
- * const {google} = require('googleapis');
1689
- * const storagetransfer = google.storagetransfer('v1');
1690
- *
1691
- * async function main() {
1692
- * const auth = new google.auth.GoogleAuth({
1693
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1694
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1695
- * });
1696
- *
1697
- * // Acquire an auth client, and bind it to all future calls
1698
- * const authClient = await auth.getClient();
1699
- * google.options({auth: authClient});
1700
- *
1701
- * // Do the magic
1702
- * const res = await storagetransfer.transferJobs.run({
1703
- * // Required. The name of the transfer job.
1704
- * jobName: 'transferJobs/.*',
1705
- *
1706
- * // Request body metadata
1707
- * requestBody: {
1708
- * // request body parameters
1709
- * // {
1710
- * // "projectId": "my_projectId"
1711
- * // }
1712
- * },
1713
- * });
1714
- * console.log(res.data);
1715
- *
1716
- * // Example response
1717
- * // {
1718
- * // "done": false,
1719
- * // "error": {},
1720
- * // "metadata": {},
1721
- * // "name": "my_name",
1722
- * // "response": {}
1723
- * // }
1724
- * }
1725
- *
1726
- * main().catch(e => {
1727
- * console.error(e);
1728
- * throw e;
1729
- * });
1730
- *
1731
- * ```
1732
1142
  *
1733
1143
  * @param params - Parameters for request
1734
1144
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1807,52 +1217,6 @@ export declare namespace storagetransfer_v1 {
1807
1217
  constructor(context: APIRequestContext);
1808
1218
  /**
1809
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.
1810
- * @example
1811
- * ```js
1812
- * // Before running the sample:
1813
- * // - Enable the API at:
1814
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1815
- * // - Login into gcloud by running:
1816
- * // `$ gcloud auth application-default login`
1817
- * // - Install the npm module by running:
1818
- * // `$ npm install googleapis`
1819
- *
1820
- * const {google} = require('googleapis');
1821
- * const storagetransfer = google.storagetransfer('v1');
1822
- *
1823
- * async function main() {
1824
- * const auth = new google.auth.GoogleAuth({
1825
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1826
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1827
- * });
1828
- *
1829
- * // Acquire an auth client, and bind it to all future calls
1830
- * const authClient = await auth.getClient();
1831
- * google.options({auth: authClient});
1832
- *
1833
- * // Do the magic
1834
- * const res = await storagetransfer.transferOperations.cancel({
1835
- * // The name of the operation resource to be cancelled.
1836
- * name: 'transferOperations/.*',
1837
- *
1838
- * // Request body metadata
1839
- * requestBody: {
1840
- * // request body parameters
1841
- * // {}
1842
- * },
1843
- * });
1844
- * console.log(res.data);
1845
- *
1846
- * // Example response
1847
- * // {}
1848
- * }
1849
- *
1850
- * main().catch(e => {
1851
- * console.error(e);
1852
- * throw e;
1853
- * });
1854
- *
1855
- * ```
1856
1220
  *
1857
1221
  * @param params - Parameters for request
1858
1222
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1867,52 +1231,6 @@ export declare namespace storagetransfer_v1 {
1867
1231
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
1868
1232
  /**
1869
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.
1870
- * @example
1871
- * ```js
1872
- * // Before running the sample:
1873
- * // - Enable the API at:
1874
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1875
- * // - Login into gcloud by running:
1876
- * // `$ gcloud auth application-default login`
1877
- * // - Install the npm module by running:
1878
- * // `$ npm install googleapis`
1879
- *
1880
- * const {google} = require('googleapis');
1881
- * const storagetransfer = google.storagetransfer('v1');
1882
- *
1883
- * async function main() {
1884
- * const auth = new google.auth.GoogleAuth({
1885
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1886
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1887
- * });
1888
- *
1889
- * // Acquire an auth client, and bind it to all future calls
1890
- * const authClient = await auth.getClient();
1891
- * google.options({auth: authClient});
1892
- *
1893
- * // Do the magic
1894
- * const res = await storagetransfer.transferOperations.get({
1895
- * // The name of the operation resource.
1896
- * name: 'transferOperations/.*',
1897
- * });
1898
- * console.log(res.data);
1899
- *
1900
- * // Example response
1901
- * // {
1902
- * // "done": false,
1903
- * // "error": {},
1904
- * // "metadata": {},
1905
- * // "name": "my_name",
1906
- * // "response": {}
1907
- * // }
1908
- * }
1909
- *
1910
- * main().catch(e => {
1911
- * console.error(e);
1912
- * throw e;
1913
- * });
1914
- *
1915
- * ```
1916
1234
  *
1917
1235
  * @param params - Parameters for request
1918
1236
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1927,55 +1245,6 @@ export declare namespace storagetransfer_v1 {
1927
1245
  get(callback: BodyResponseCallback<Schema$Operation>): void;
1928
1246
  /**
1929
1247
  * Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.
1930
- * @example
1931
- * ```js
1932
- * // Before running the sample:
1933
- * // - Enable the API at:
1934
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1935
- * // - Login into gcloud by running:
1936
- * // `$ gcloud auth application-default login`
1937
- * // - Install the npm module by running:
1938
- * // `$ npm install googleapis`
1939
- *
1940
- * const {google} = require('googleapis');
1941
- * const storagetransfer = google.storagetransfer('v1');
1942
- *
1943
- * async function main() {
1944
- * const auth = new google.auth.GoogleAuth({
1945
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1946
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1947
- * });
1948
- *
1949
- * // Acquire an auth client, and bind it to all future calls
1950
- * const authClient = await auth.getClient();
1951
- * google.options({auth: authClient});
1952
- *
1953
- * // Do the magic
1954
- * const res = await storagetransfer.transferOperations.list({
1955
- * // 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.
1956
- * filter: 'placeholder-value',
1957
- * // Required. The name of the type being listed; must be `transferOperations`.
1958
- * name: 'transferOperations',
1959
- * // The list page size. The max allowed value is 256.
1960
- * pageSize: 'placeholder-value',
1961
- * // The list page token.
1962
- * pageToken: 'placeholder-value',
1963
- * });
1964
- * console.log(res.data);
1965
- *
1966
- * // Example response
1967
- * // {
1968
- * // "nextPageToken": "my_nextPageToken",
1969
- * // "operations": []
1970
- * // }
1971
- * }
1972
- *
1973
- * main().catch(e => {
1974
- * console.error(e);
1975
- * throw e;
1976
- * });
1977
- *
1978
- * ```
1979
1248
  *
1980
1249
  * @param params - Parameters for request
1981
1250
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1990,52 +1259,6 @@ export declare namespace storagetransfer_v1 {
1990
1259
  list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1991
1260
  /**
1992
1261
  * Pauses a transfer operation.
1993
- * @example
1994
- * ```js
1995
- * // Before running the sample:
1996
- * // - Enable the API at:
1997
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1998
- * // - Login into gcloud by running:
1999
- * // `$ gcloud auth application-default login`
2000
- * // - Install the npm module by running:
2001
- * // `$ npm install googleapis`
2002
- *
2003
- * const {google} = require('googleapis');
2004
- * const storagetransfer = google.storagetransfer('v1');
2005
- *
2006
- * async function main() {
2007
- * const auth = new google.auth.GoogleAuth({
2008
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2009
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2010
- * });
2011
- *
2012
- * // Acquire an auth client, and bind it to all future calls
2013
- * const authClient = await auth.getClient();
2014
- * google.options({auth: authClient});
2015
- *
2016
- * // Do the magic
2017
- * const res = await storagetransfer.transferOperations.pause({
2018
- * // Required. The name of the transfer operation.
2019
- * name: 'transferOperations/.*',
2020
- *
2021
- * // Request body metadata
2022
- * requestBody: {
2023
- * // request body parameters
2024
- * // {}
2025
- * },
2026
- * });
2027
- * console.log(res.data);
2028
- *
2029
- * // Example response
2030
- * // {}
2031
- * }
2032
- *
2033
- * main().catch(e => {
2034
- * console.error(e);
2035
- * throw e;
2036
- * });
2037
- *
2038
- * ```
2039
1262
  *
2040
1263
  * @param params - Parameters for request
2041
1264
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2050,52 +1273,6 @@ export declare namespace storagetransfer_v1 {
2050
1273
  pause(callback: BodyResponseCallback<Schema$Empty>): void;
2051
1274
  /**
2052
1275
  * Resumes a transfer operation that is paused.
2053
- * @example
2054
- * ```js
2055
- * // Before running the sample:
2056
- * // - Enable the API at:
2057
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2058
- * // - Login into gcloud by running:
2059
- * // `$ gcloud auth application-default login`
2060
- * // - Install the npm module by running:
2061
- * // `$ npm install googleapis`
2062
- *
2063
- * const {google} = require('googleapis');
2064
- * const storagetransfer = google.storagetransfer('v1');
2065
- *
2066
- * async function main() {
2067
- * const auth = new google.auth.GoogleAuth({
2068
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2069
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2070
- * });
2071
- *
2072
- * // Acquire an auth client, and bind it to all future calls
2073
- * const authClient = await auth.getClient();
2074
- * google.options({auth: authClient});
2075
- *
2076
- * // Do the magic
2077
- * const res = await storagetransfer.transferOperations.resume({
2078
- * // Required. The name of the transfer operation.
2079
- * name: 'transferOperations/.*',
2080
- *
2081
- * // Request body metadata
2082
- * requestBody: {
2083
- * // request body parameters
2084
- * // {}
2085
- * },
2086
- * });
2087
- * console.log(res.data);
2088
- *
2089
- * // Example response
2090
- * // {}
2091
- * }
2092
- *
2093
- * main().catch(e => {
2094
- * console.error(e);
2095
- * throw e;
2096
- * });
2097
- *
2098
- * ```
2099
1276
  *
2100
1277
  * @param params - Parameters for request
2101
1278
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.