@googleapis/storagetransfer 8.0.1 → 10.0.0
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 +98 -0
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/v1.d.ts +965 -13
- package/build/v1.js +12 -1
- package/build/v1.js.map +1 -1
- package/package.json +4 -4
- package/v1.ts +965 -12
package/v1.ts
CHANGED
|
@@ -240,6 +240,10 @@ export namespace storagetransfer_v1 {
|
|
|
240
240
|
* 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. Format: `projects/{project_number\}/secrets/{secret_name\}`
|
|
241
241
|
*/
|
|
242
242
|
credentialsSecret?: string | null;
|
|
243
|
+
/**
|
|
244
|
+
* Optional. Federated identity config of a user registered Azure application. If `federated_identity_config` is specified, do not specify azure_credentials or credentials_secret.
|
|
245
|
+
*/
|
|
246
|
+
federatedIdentityConfig?: Schema$FederatedIdentityConfig;
|
|
243
247
|
/**
|
|
244
248
|
* 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 '/'.
|
|
245
249
|
*/
|
|
@@ -297,11 +301,11 @@ export namespace storagetransfer_v1 {
|
|
|
297
301
|
*/
|
|
298
302
|
export interface Schema$ErrorLogEntry {
|
|
299
303
|
/**
|
|
300
|
-
* A list of messages that carry the error details.
|
|
304
|
+
* Optional. A list of messages that carry the error details.
|
|
301
305
|
*/
|
|
302
306
|
errorDetails?: string[] | null;
|
|
303
307
|
/**
|
|
304
|
-
*
|
|
308
|
+
* Output only. A URL that refers to the target (a data source, a data sink, or an object) with which the error is associated.
|
|
305
309
|
*/
|
|
306
310
|
url?: string | null;
|
|
307
311
|
}
|
|
@@ -339,6 +343,19 @@ export namespace storagetransfer_v1 {
|
|
|
339
343
|
*/
|
|
340
344
|
name?: string | null;
|
|
341
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* The identity of an Azure application through which Storage Transfer Service can authenticate requests using Azure workload identity federation. Storage Transfer Service can issue requests to Azure Storage through registered Azure applications, eliminating the need to pass credentials to Storage Transfer Service directly. To configure federated identity, see [Configure access to Microsoft Azure Storage](https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#option_3_authenticate_using_federated_identity).
|
|
348
|
+
*/
|
|
349
|
+
export interface Schema$FederatedIdentityConfig {
|
|
350
|
+
/**
|
|
351
|
+
* Required. The client (application) ID of the application with federated credentials.
|
|
352
|
+
*/
|
|
353
|
+
clientId?: string | null;
|
|
354
|
+
/**
|
|
355
|
+
* Required. The tenant (directory) ID of the application with federated credentials.
|
|
356
|
+
*/
|
|
357
|
+
tenantId?: string | null;
|
|
358
|
+
}
|
|
342
359
|
/**
|
|
343
360
|
* 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.
|
|
344
361
|
*/
|
|
@@ -828,7 +845,7 @@ export namespace storagetransfer_v1 {
|
|
|
828
845
|
*/
|
|
829
846
|
schedule?: Schema$Schedule;
|
|
830
847
|
/**
|
|
831
|
-
* Optional. The service account to
|
|
848
|
+
* Optional. The user-managed service account to which to delegate service agent permissions. You can grant Cloud Storage bucket permissions to this service account instead of to the Transfer Service service agent. Format is `projects/-/serviceAccounts/ACCOUNT_EMAIL_OR_UNIQUEID` Either the service account email (`SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`) or the unique ID (`123456789012345678901`) are accepted in the string. The `-` wildcard character is required; replacing it with a project ID is invalid. See https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions for required permissions.
|
|
832
849
|
*/
|
|
833
850
|
serviceAccount?: string | null;
|
|
834
851
|
/**
|
|
@@ -928,23 +945,23 @@ export namespace storagetransfer_v1 {
|
|
|
928
945
|
*/
|
|
929
946
|
export interface Schema$TransferSpec {
|
|
930
947
|
/**
|
|
931
|
-
* An AWS S3 compatible data source.
|
|
948
|
+
* Optional. An AWS S3 compatible data source.
|
|
932
949
|
*/
|
|
933
950
|
awsS3CompatibleDataSource?: Schema$AwsS3CompatibleData;
|
|
934
951
|
/**
|
|
935
|
-
* An AWS S3 data source.
|
|
952
|
+
* Optional. An AWS S3 data source.
|
|
936
953
|
*/
|
|
937
954
|
awsS3DataSource?: Schema$AwsS3Data;
|
|
938
955
|
/**
|
|
939
|
-
* An Azure Blob Storage data source.
|
|
956
|
+
* Optional. An Azure Blob Storage data source.
|
|
940
957
|
*/
|
|
941
958
|
azureBlobStorageDataSource?: Schema$AzureBlobStorageData;
|
|
942
959
|
/**
|
|
943
|
-
* A Cloud Storage data sink.
|
|
960
|
+
* Optional. A Cloud Storage data sink.
|
|
944
961
|
*/
|
|
945
962
|
gcsDataSink?: Schema$GcsData;
|
|
946
963
|
/**
|
|
947
|
-
* A Cloud Storage data source.
|
|
964
|
+
* Optional. A Cloud Storage data source.
|
|
948
965
|
*/
|
|
949
966
|
gcsDataSource?: Schema$GcsData;
|
|
950
967
|
/**
|
|
@@ -952,11 +969,11 @@ export namespace storagetransfer_v1 {
|
|
|
952
969
|
*/
|
|
953
970
|
gcsIntermediateDataLocation?: Schema$GcsData;
|
|
954
971
|
/**
|
|
955
|
-
* An HDFS cluster data source.
|
|
972
|
+
* Optional. An HDFS cluster data source.
|
|
956
973
|
*/
|
|
957
974
|
hdfsDataSource?: Schema$HdfsData;
|
|
958
975
|
/**
|
|
959
|
-
* An HTTP URL data source.
|
|
976
|
+
* Optional. An HTTP URL data source.
|
|
960
977
|
*/
|
|
961
978
|
httpDataSource?: Schema$HttpData;
|
|
962
979
|
/**
|
|
@@ -964,11 +981,11 @@ export namespace storagetransfer_v1 {
|
|
|
964
981
|
*/
|
|
965
982
|
objectConditions?: Schema$ObjectConditions;
|
|
966
983
|
/**
|
|
967
|
-
* A POSIX Filesystem data sink.
|
|
984
|
+
* Optional. A POSIX Filesystem data sink.
|
|
968
985
|
*/
|
|
969
986
|
posixDataSink?: Schema$PosixFilesystem;
|
|
970
987
|
/**
|
|
971
|
-
* A POSIX Filesystem data source.
|
|
988
|
+
* Optional. A POSIX Filesystem data source.
|
|
972
989
|
*/
|
|
973
990
|
posixDataSource?: Schema$PosixFilesystem;
|
|
974
991
|
/**
|
|
@@ -1014,6 +1031,53 @@ export namespace storagetransfer_v1 {
|
|
|
1014
1031
|
|
|
1015
1032
|
/**
|
|
1016
1033
|
* 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.
|
|
1034
|
+
* @example
|
|
1035
|
+
* ```js
|
|
1036
|
+
* // Before running the sample:
|
|
1037
|
+
* // - Enable the API at:
|
|
1038
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1039
|
+
* // - Login into gcloud by running:
|
|
1040
|
+
* // ```sh
|
|
1041
|
+
* // $ gcloud auth application-default login
|
|
1042
|
+
* // ```
|
|
1043
|
+
* // - Install the npm module by running:
|
|
1044
|
+
* // ```sh
|
|
1045
|
+
* // $ npm install googleapis
|
|
1046
|
+
* // ```
|
|
1047
|
+
*
|
|
1048
|
+
* const {google} = require('googleapis');
|
|
1049
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1050
|
+
*
|
|
1051
|
+
* async function main() {
|
|
1052
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1053
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1054
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1055
|
+
* });
|
|
1056
|
+
*
|
|
1057
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1058
|
+
* const authClient = await auth.getClient();
|
|
1059
|
+
* google.options({auth: authClient});
|
|
1060
|
+
*
|
|
1061
|
+
* // Do the magic
|
|
1062
|
+
* const res = await storagetransfer.googleServiceAccounts.get({
|
|
1063
|
+
* // Required. The ID of the Google Cloud project that the Google service account is associated with.
|
|
1064
|
+
* projectId: 'placeholder-value',
|
|
1065
|
+
* });
|
|
1066
|
+
* console.log(res.data);
|
|
1067
|
+
*
|
|
1068
|
+
* // Example response
|
|
1069
|
+
* // {
|
|
1070
|
+
* // "accountEmail": "my_accountEmail",
|
|
1071
|
+
* // "subjectId": "my_subjectId"
|
|
1072
|
+
* // }
|
|
1073
|
+
* }
|
|
1074
|
+
*
|
|
1075
|
+
* main().catch(e => {
|
|
1076
|
+
* console.error(e);
|
|
1077
|
+
* throw e;
|
|
1078
|
+
* });
|
|
1079
|
+
*
|
|
1080
|
+
* ```
|
|
1017
1081
|
*
|
|
1018
1082
|
* @param params - Parameters for request
|
|
1019
1083
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1132,6 +1196,68 @@ export namespace storagetransfer_v1 {
|
|
|
1132
1196
|
|
|
1133
1197
|
/**
|
|
1134
1198
|
* Creates an agent pool resource.
|
|
1199
|
+
* @example
|
|
1200
|
+
* ```js
|
|
1201
|
+
* // Before running the sample:
|
|
1202
|
+
* // - Enable the API at:
|
|
1203
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1204
|
+
* // - Login into gcloud by running:
|
|
1205
|
+
* // ```sh
|
|
1206
|
+
* // $ gcloud auth application-default login
|
|
1207
|
+
* // ```
|
|
1208
|
+
* // - Install the npm module by running:
|
|
1209
|
+
* // ```sh
|
|
1210
|
+
* // $ npm install googleapis
|
|
1211
|
+
* // ```
|
|
1212
|
+
*
|
|
1213
|
+
* const {google} = require('googleapis');
|
|
1214
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1215
|
+
*
|
|
1216
|
+
* async function main() {
|
|
1217
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1218
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1219
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1220
|
+
* });
|
|
1221
|
+
*
|
|
1222
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1223
|
+
* const authClient = await auth.getClient();
|
|
1224
|
+
* google.options({auth: authClient});
|
|
1225
|
+
*
|
|
1226
|
+
* // Do the magic
|
|
1227
|
+
* const res = await storagetransfer.projects.agentPools.create({
|
|
1228
|
+
* // 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])?$`.
|
|
1229
|
+
* agentPoolId: 'placeholder-value',
|
|
1230
|
+
* // Required. The ID of the Google Cloud project that owns the agent pool.
|
|
1231
|
+
* projectId: '[^/]+',
|
|
1232
|
+
*
|
|
1233
|
+
* // Request body metadata
|
|
1234
|
+
* requestBody: {
|
|
1235
|
+
* // request body parameters
|
|
1236
|
+
* // {
|
|
1237
|
+
* // "bandwidthLimit": {},
|
|
1238
|
+
* // "displayName": "my_displayName",
|
|
1239
|
+
* // "name": "my_name",
|
|
1240
|
+
* // "state": "my_state"
|
|
1241
|
+
* // }
|
|
1242
|
+
* },
|
|
1243
|
+
* });
|
|
1244
|
+
* console.log(res.data);
|
|
1245
|
+
*
|
|
1246
|
+
* // Example response
|
|
1247
|
+
* // {
|
|
1248
|
+
* // "bandwidthLimit": {},
|
|
1249
|
+
* // "displayName": "my_displayName",
|
|
1250
|
+
* // "name": "my_name",
|
|
1251
|
+
* // "state": "my_state"
|
|
1252
|
+
* // }
|
|
1253
|
+
* }
|
|
1254
|
+
*
|
|
1255
|
+
* main().catch(e => {
|
|
1256
|
+
* console.error(e);
|
|
1257
|
+
* throw e;
|
|
1258
|
+
* });
|
|
1259
|
+
*
|
|
1260
|
+
* ```
|
|
1135
1261
|
*
|
|
1136
1262
|
* @param params - Parameters for request
|
|
1137
1263
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1224,6 +1350,50 @@ export namespace storagetransfer_v1 {
|
|
|
1224
1350
|
|
|
1225
1351
|
/**
|
|
1226
1352
|
* Deletes an agent pool.
|
|
1353
|
+
* @example
|
|
1354
|
+
* ```js
|
|
1355
|
+
* // Before running the sample:
|
|
1356
|
+
* // - Enable the API at:
|
|
1357
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1358
|
+
* // - Login into gcloud by running:
|
|
1359
|
+
* // ```sh
|
|
1360
|
+
* // $ gcloud auth application-default login
|
|
1361
|
+
* // ```
|
|
1362
|
+
* // - Install the npm module by running:
|
|
1363
|
+
* // ```sh
|
|
1364
|
+
* // $ npm install googleapis
|
|
1365
|
+
* // ```
|
|
1366
|
+
*
|
|
1367
|
+
* const {google} = require('googleapis');
|
|
1368
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1369
|
+
*
|
|
1370
|
+
* async function main() {
|
|
1371
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1372
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1373
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1374
|
+
* });
|
|
1375
|
+
*
|
|
1376
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1377
|
+
* const authClient = await auth.getClient();
|
|
1378
|
+
* google.options({auth: authClient});
|
|
1379
|
+
*
|
|
1380
|
+
* // Do the magic
|
|
1381
|
+
* const res = await storagetransfer.projects.agentPools.delete({
|
|
1382
|
+
* // Required. The name of the agent pool to delete.
|
|
1383
|
+
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1384
|
+
* });
|
|
1385
|
+
* console.log(res.data);
|
|
1386
|
+
*
|
|
1387
|
+
* // Example response
|
|
1388
|
+
* // {}
|
|
1389
|
+
* }
|
|
1390
|
+
*
|
|
1391
|
+
* main().catch(e => {
|
|
1392
|
+
* console.error(e);
|
|
1393
|
+
* throw e;
|
|
1394
|
+
* });
|
|
1395
|
+
*
|
|
1396
|
+
* ```
|
|
1227
1397
|
*
|
|
1228
1398
|
* @param params - Parameters for request
|
|
1229
1399
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1313,6 +1483,55 @@ export namespace storagetransfer_v1 {
|
|
|
1313
1483
|
|
|
1314
1484
|
/**
|
|
1315
1485
|
* Gets an agent pool.
|
|
1486
|
+
* @example
|
|
1487
|
+
* ```js
|
|
1488
|
+
* // Before running the sample:
|
|
1489
|
+
* // - Enable the API at:
|
|
1490
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1491
|
+
* // - Login into gcloud by running:
|
|
1492
|
+
* // ```sh
|
|
1493
|
+
* // $ gcloud auth application-default login
|
|
1494
|
+
* // ```
|
|
1495
|
+
* // - Install the npm module by running:
|
|
1496
|
+
* // ```sh
|
|
1497
|
+
* // $ npm install googleapis
|
|
1498
|
+
* // ```
|
|
1499
|
+
*
|
|
1500
|
+
* const {google} = require('googleapis');
|
|
1501
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1502
|
+
*
|
|
1503
|
+
* async function main() {
|
|
1504
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1505
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1506
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1507
|
+
* });
|
|
1508
|
+
*
|
|
1509
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1510
|
+
* const authClient = await auth.getClient();
|
|
1511
|
+
* google.options({auth: authClient});
|
|
1512
|
+
*
|
|
1513
|
+
* // Do the magic
|
|
1514
|
+
* const res = await storagetransfer.projects.agentPools.get({
|
|
1515
|
+
* // Required. The name of the agent pool to get.
|
|
1516
|
+
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1517
|
+
* });
|
|
1518
|
+
* console.log(res.data);
|
|
1519
|
+
*
|
|
1520
|
+
* // Example response
|
|
1521
|
+
* // {
|
|
1522
|
+
* // "bandwidthLimit": {},
|
|
1523
|
+
* // "displayName": "my_displayName",
|
|
1524
|
+
* // "name": "my_name",
|
|
1525
|
+
* // "state": "my_state"
|
|
1526
|
+
* // }
|
|
1527
|
+
* }
|
|
1528
|
+
*
|
|
1529
|
+
* main().catch(e => {
|
|
1530
|
+
* console.error(e);
|
|
1531
|
+
* throw e;
|
|
1532
|
+
* });
|
|
1533
|
+
*
|
|
1534
|
+
* ```
|
|
1316
1535
|
*
|
|
1317
1536
|
* @param params - Parameters for request
|
|
1318
1537
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1402,6 +1621,59 @@ export namespace storagetransfer_v1 {
|
|
|
1402
1621
|
|
|
1403
1622
|
/**
|
|
1404
1623
|
* Lists agent pools.
|
|
1624
|
+
* @example
|
|
1625
|
+
* ```js
|
|
1626
|
+
* // Before running the sample:
|
|
1627
|
+
* // - Enable the API at:
|
|
1628
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1629
|
+
* // - Login into gcloud by running:
|
|
1630
|
+
* // ```sh
|
|
1631
|
+
* // $ gcloud auth application-default login
|
|
1632
|
+
* // ```
|
|
1633
|
+
* // - Install the npm module by running:
|
|
1634
|
+
* // ```sh
|
|
1635
|
+
* // $ npm install googleapis
|
|
1636
|
+
* // ```
|
|
1637
|
+
*
|
|
1638
|
+
* const {google} = require('googleapis');
|
|
1639
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1640
|
+
*
|
|
1641
|
+
* async function main() {
|
|
1642
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1643
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1644
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1645
|
+
* });
|
|
1646
|
+
*
|
|
1647
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1648
|
+
* const authClient = await auth.getClient();
|
|
1649
|
+
* google.options({auth: authClient});
|
|
1650
|
+
*
|
|
1651
|
+
* // Do the magic
|
|
1652
|
+
* const res = await storagetransfer.projects.agentPools.list({
|
|
1653
|
+
* // 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.
|
|
1654
|
+
* filter: 'placeholder-value',
|
|
1655
|
+
* // The list page size. The max allowed value is `256`.
|
|
1656
|
+
* pageSize: 'placeholder-value',
|
|
1657
|
+
* // The list page token.
|
|
1658
|
+
* pageToken: 'placeholder-value',
|
|
1659
|
+
* // Required. The ID of the Google Cloud project that owns the job.
|
|
1660
|
+
* projectId: '[^/]+',
|
|
1661
|
+
* });
|
|
1662
|
+
* console.log(res.data);
|
|
1663
|
+
*
|
|
1664
|
+
* // Example response
|
|
1665
|
+
* // {
|
|
1666
|
+
* // "agentPools": [],
|
|
1667
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1668
|
+
* // }
|
|
1669
|
+
* }
|
|
1670
|
+
*
|
|
1671
|
+
* main().catch(e => {
|
|
1672
|
+
* console.error(e);
|
|
1673
|
+
* throw e;
|
|
1674
|
+
* });
|
|
1675
|
+
*
|
|
1676
|
+
* ```
|
|
1405
1677
|
*
|
|
1406
1678
|
* @param params - Parameters for request
|
|
1407
1679
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1496,6 +1768,68 @@ export namespace storagetransfer_v1 {
|
|
|
1496
1768
|
|
|
1497
1769
|
/**
|
|
1498
1770
|
* Updates an existing agent pool resource.
|
|
1771
|
+
* @example
|
|
1772
|
+
* ```js
|
|
1773
|
+
* // Before running the sample:
|
|
1774
|
+
* // - Enable the API at:
|
|
1775
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1776
|
+
* // - Login into gcloud by running:
|
|
1777
|
+
* // ```sh
|
|
1778
|
+
* // $ gcloud auth application-default login
|
|
1779
|
+
* // ```
|
|
1780
|
+
* // - Install the npm module by running:
|
|
1781
|
+
* // ```sh
|
|
1782
|
+
* // $ npm install googleapis
|
|
1783
|
+
* // ```
|
|
1784
|
+
*
|
|
1785
|
+
* const {google} = require('googleapis');
|
|
1786
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1787
|
+
*
|
|
1788
|
+
* async function main() {
|
|
1789
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1790
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1791
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1792
|
+
* });
|
|
1793
|
+
*
|
|
1794
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1795
|
+
* const authClient = await auth.getClient();
|
|
1796
|
+
* google.options({auth: authClient});
|
|
1797
|
+
*
|
|
1798
|
+
* // Do the magic
|
|
1799
|
+
* const res = await storagetransfer.projects.agentPools.patch({
|
|
1800
|
+
* // Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id\}/agentPools/{agent_pool_id\}`
|
|
1801
|
+
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1802
|
+
* // 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
|
|
1803
|
+
* updateMask: 'placeholder-value',
|
|
1804
|
+
*
|
|
1805
|
+
* // Request body metadata
|
|
1806
|
+
* requestBody: {
|
|
1807
|
+
* // request body parameters
|
|
1808
|
+
* // {
|
|
1809
|
+
* // "bandwidthLimit": {},
|
|
1810
|
+
* // "displayName": "my_displayName",
|
|
1811
|
+
* // "name": "my_name",
|
|
1812
|
+
* // "state": "my_state"
|
|
1813
|
+
* // }
|
|
1814
|
+
* },
|
|
1815
|
+
* });
|
|
1816
|
+
* console.log(res.data);
|
|
1817
|
+
*
|
|
1818
|
+
* // Example response
|
|
1819
|
+
* // {
|
|
1820
|
+
* // "bandwidthLimit": {},
|
|
1821
|
+
* // "displayName": "my_displayName",
|
|
1822
|
+
* // "name": "my_name",
|
|
1823
|
+
* // "state": "my_state"
|
|
1824
|
+
* // }
|
|
1825
|
+
* }
|
|
1826
|
+
*
|
|
1827
|
+
* main().catch(e => {
|
|
1828
|
+
* console.error(e);
|
|
1829
|
+
* throw e;
|
|
1830
|
+
* });
|
|
1831
|
+
*
|
|
1832
|
+
* ```
|
|
1499
1833
|
*
|
|
1500
1834
|
* @param params - Parameters for request
|
|
1501
1835
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1658,6 +1992,85 @@ export namespace storagetransfer_v1 {
|
|
|
1658
1992
|
|
|
1659
1993
|
/**
|
|
1660
1994
|
* Creates a transfer job that runs periodically.
|
|
1995
|
+
* @example
|
|
1996
|
+
* ```js
|
|
1997
|
+
* // Before running the sample:
|
|
1998
|
+
* // - Enable the API at:
|
|
1999
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2000
|
+
* // - Login into gcloud by running:
|
|
2001
|
+
* // ```sh
|
|
2002
|
+
* // $ gcloud auth application-default login
|
|
2003
|
+
* // ```
|
|
2004
|
+
* // - Install the npm module by running:
|
|
2005
|
+
* // ```sh
|
|
2006
|
+
* // $ npm install googleapis
|
|
2007
|
+
* // ```
|
|
2008
|
+
*
|
|
2009
|
+
* const {google} = require('googleapis');
|
|
2010
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2011
|
+
*
|
|
2012
|
+
* async function main() {
|
|
2013
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2014
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2015
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2016
|
+
* });
|
|
2017
|
+
*
|
|
2018
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2019
|
+
* const authClient = await auth.getClient();
|
|
2020
|
+
* google.options({auth: authClient});
|
|
2021
|
+
*
|
|
2022
|
+
* // Do the magic
|
|
2023
|
+
* const res = await storagetransfer.transferJobs.create({
|
|
2024
|
+
* // Request body metadata
|
|
2025
|
+
* requestBody: {
|
|
2026
|
+
* // request body parameters
|
|
2027
|
+
* // {
|
|
2028
|
+
* // "creationTime": "my_creationTime",
|
|
2029
|
+
* // "deletionTime": "my_deletionTime",
|
|
2030
|
+
* // "description": "my_description",
|
|
2031
|
+
* // "eventStream": {},
|
|
2032
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
2033
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
2034
|
+
* // "loggingConfig": {},
|
|
2035
|
+
* // "name": "my_name",
|
|
2036
|
+
* // "notificationConfig": {},
|
|
2037
|
+
* // "projectId": "my_projectId",
|
|
2038
|
+
* // "replicationSpec": {},
|
|
2039
|
+
* // "schedule": {},
|
|
2040
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
2041
|
+
* // "status": "my_status",
|
|
2042
|
+
* // "transferSpec": {}
|
|
2043
|
+
* // }
|
|
2044
|
+
* },
|
|
2045
|
+
* });
|
|
2046
|
+
* console.log(res.data);
|
|
2047
|
+
*
|
|
2048
|
+
* // Example response
|
|
2049
|
+
* // {
|
|
2050
|
+
* // "creationTime": "my_creationTime",
|
|
2051
|
+
* // "deletionTime": "my_deletionTime",
|
|
2052
|
+
* // "description": "my_description",
|
|
2053
|
+
* // "eventStream": {},
|
|
2054
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
2055
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
2056
|
+
* // "loggingConfig": {},
|
|
2057
|
+
* // "name": "my_name",
|
|
2058
|
+
* // "notificationConfig": {},
|
|
2059
|
+
* // "projectId": "my_projectId",
|
|
2060
|
+
* // "replicationSpec": {},
|
|
2061
|
+
* // "schedule": {},
|
|
2062
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
2063
|
+
* // "status": "my_status",
|
|
2064
|
+
* // "transferSpec": {}
|
|
2065
|
+
* // }
|
|
2066
|
+
* }
|
|
2067
|
+
*
|
|
2068
|
+
* main().catch(e => {
|
|
2069
|
+
* console.error(e);
|
|
2070
|
+
* throw e;
|
|
2071
|
+
* });
|
|
2072
|
+
*
|
|
2073
|
+
* ```
|
|
1661
2074
|
*
|
|
1662
2075
|
* @param params - Parameters for request
|
|
1663
2076
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1747,6 +2160,52 @@ export namespace storagetransfer_v1 {
|
|
|
1747
2160
|
|
|
1748
2161
|
/**
|
|
1749
2162
|
* Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
|
|
2163
|
+
* @example
|
|
2164
|
+
* ```js
|
|
2165
|
+
* // Before running the sample:
|
|
2166
|
+
* // - Enable the API at:
|
|
2167
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2168
|
+
* // - Login into gcloud by running:
|
|
2169
|
+
* // ```sh
|
|
2170
|
+
* // $ gcloud auth application-default login
|
|
2171
|
+
* // ```
|
|
2172
|
+
* // - Install the npm module by running:
|
|
2173
|
+
* // ```sh
|
|
2174
|
+
* // $ npm install googleapis
|
|
2175
|
+
* // ```
|
|
2176
|
+
*
|
|
2177
|
+
* const {google} = require('googleapis');
|
|
2178
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2179
|
+
*
|
|
2180
|
+
* async function main() {
|
|
2181
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2182
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2183
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2184
|
+
* });
|
|
2185
|
+
*
|
|
2186
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2187
|
+
* const authClient = await auth.getClient();
|
|
2188
|
+
* google.options({auth: authClient});
|
|
2189
|
+
*
|
|
2190
|
+
* // Do the magic
|
|
2191
|
+
* const res = await storagetransfer.transferJobs.delete({
|
|
2192
|
+
* // Required. The job to delete.
|
|
2193
|
+
* jobName: 'transferJobs/.*',
|
|
2194
|
+
* // Required. The ID of the Google Cloud project that owns the job.
|
|
2195
|
+
* projectId: 'placeholder-value',
|
|
2196
|
+
* });
|
|
2197
|
+
* console.log(res.data);
|
|
2198
|
+
*
|
|
2199
|
+
* // Example response
|
|
2200
|
+
* // {}
|
|
2201
|
+
* }
|
|
2202
|
+
*
|
|
2203
|
+
* main().catch(e => {
|
|
2204
|
+
* console.error(e);
|
|
2205
|
+
* throw e;
|
|
2206
|
+
* });
|
|
2207
|
+
*
|
|
2208
|
+
* ```
|
|
1750
2209
|
*
|
|
1751
2210
|
* @param params - Parameters for request
|
|
1752
2211
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1836,6 +2295,68 @@ export namespace storagetransfer_v1 {
|
|
|
1836
2295
|
|
|
1837
2296
|
/**
|
|
1838
2297
|
* Gets a transfer job.
|
|
2298
|
+
* @example
|
|
2299
|
+
* ```js
|
|
2300
|
+
* // Before running the sample:
|
|
2301
|
+
* // - Enable the API at:
|
|
2302
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2303
|
+
* // - Login into gcloud by running:
|
|
2304
|
+
* // ```sh
|
|
2305
|
+
* // $ gcloud auth application-default login
|
|
2306
|
+
* // ```
|
|
2307
|
+
* // - Install the npm module by running:
|
|
2308
|
+
* // ```sh
|
|
2309
|
+
* // $ npm install googleapis
|
|
2310
|
+
* // ```
|
|
2311
|
+
*
|
|
2312
|
+
* const {google} = require('googleapis');
|
|
2313
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2314
|
+
*
|
|
2315
|
+
* async function main() {
|
|
2316
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2317
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2318
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2319
|
+
* });
|
|
2320
|
+
*
|
|
2321
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2322
|
+
* const authClient = await auth.getClient();
|
|
2323
|
+
* google.options({auth: authClient});
|
|
2324
|
+
*
|
|
2325
|
+
* // Do the magic
|
|
2326
|
+
* const res = await storagetransfer.transferJobs.get({
|
|
2327
|
+
* // Required. The job to get.
|
|
2328
|
+
* jobName: 'transferJobs/.*',
|
|
2329
|
+
* // Required. The ID of the Google Cloud project that owns the job.
|
|
2330
|
+
* projectId: 'placeholder-value',
|
|
2331
|
+
* });
|
|
2332
|
+
* console.log(res.data);
|
|
2333
|
+
*
|
|
2334
|
+
* // Example response
|
|
2335
|
+
* // {
|
|
2336
|
+
* // "creationTime": "my_creationTime",
|
|
2337
|
+
* // "deletionTime": "my_deletionTime",
|
|
2338
|
+
* // "description": "my_description",
|
|
2339
|
+
* // "eventStream": {},
|
|
2340
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
2341
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
2342
|
+
* // "loggingConfig": {},
|
|
2343
|
+
* // "name": "my_name",
|
|
2344
|
+
* // "notificationConfig": {},
|
|
2345
|
+
* // "projectId": "my_projectId",
|
|
2346
|
+
* // "replicationSpec": {},
|
|
2347
|
+
* // "schedule": {},
|
|
2348
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
2349
|
+
* // "status": "my_status",
|
|
2350
|
+
* // "transferSpec": {}
|
|
2351
|
+
* // }
|
|
2352
|
+
* }
|
|
2353
|
+
*
|
|
2354
|
+
* main().catch(e => {
|
|
2355
|
+
* console.error(e);
|
|
2356
|
+
* throw e;
|
|
2357
|
+
* });
|
|
2358
|
+
*
|
|
2359
|
+
* ```
|
|
1839
2360
|
*
|
|
1840
2361
|
* @param params - Parameters for request
|
|
1841
2362
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1924,6 +2445,57 @@ export namespace storagetransfer_v1 {
|
|
|
1924
2445
|
|
|
1925
2446
|
/**
|
|
1926
2447
|
* Lists transfer jobs.
|
|
2448
|
+
* @example
|
|
2449
|
+
* ```js
|
|
2450
|
+
* // Before running the sample:
|
|
2451
|
+
* // - Enable the API at:
|
|
2452
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2453
|
+
* // - Login into gcloud by running:
|
|
2454
|
+
* // ```sh
|
|
2455
|
+
* // $ gcloud auth application-default login
|
|
2456
|
+
* // ```
|
|
2457
|
+
* // - Install the npm module by running:
|
|
2458
|
+
* // ```sh
|
|
2459
|
+
* // $ npm install googleapis
|
|
2460
|
+
* // ```
|
|
2461
|
+
*
|
|
2462
|
+
* const {google} = require('googleapis');
|
|
2463
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2464
|
+
*
|
|
2465
|
+
* async function main() {
|
|
2466
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2467
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2468
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2469
|
+
* });
|
|
2470
|
+
*
|
|
2471
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2472
|
+
* const authClient = await auth.getClient();
|
|
2473
|
+
* google.options({auth: authClient});
|
|
2474
|
+
*
|
|
2475
|
+
* // Do the magic
|
|
2476
|
+
* const res = await storagetransfer.transferJobs.list({
|
|
2477
|
+
* // Required. A list of query parameters specified as JSON text in the form of: ``` { "projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...], "dataBackend":"QUERY_REPLICATION_CONFIGS", "sourceBucket":"source-bucket-name", "sinkBucket":"sink-bucket-name", \} ``` The JSON formatting in the example is for display only; provide the query parameters without spaces or line breaks. * `projectId` is required. * Since `jobNames` and `jobStatuses` support multiple values, their values must be specified with array notation. `jobNames` and `jobStatuses` are optional. Valid values are case-insensitive: * ENABLED * DISABLED * DELETED * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of cross-bucket replication jobs. * Limit the results to jobs from a particular bucket with `sourceBucket` and/or to a particular bucket with `sinkBucket`.
|
|
2478
|
+
* filter: 'placeholder-value',
|
|
2479
|
+
* // The list page size. The max allowed value is 256.
|
|
2480
|
+
* pageSize: 'placeholder-value',
|
|
2481
|
+
* // The list page token.
|
|
2482
|
+
* pageToken: 'placeholder-value',
|
|
2483
|
+
* });
|
|
2484
|
+
* console.log(res.data);
|
|
2485
|
+
*
|
|
2486
|
+
* // Example response
|
|
2487
|
+
* // {
|
|
2488
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2489
|
+
* // "transferJobs": []
|
|
2490
|
+
* // }
|
|
2491
|
+
* }
|
|
2492
|
+
*
|
|
2493
|
+
* main().catch(e => {
|
|
2494
|
+
* console.error(e);
|
|
2495
|
+
* throw e;
|
|
2496
|
+
* });
|
|
2497
|
+
*
|
|
2498
|
+
* ```
|
|
1927
2499
|
*
|
|
1928
2500
|
* @param params - Parameters for request
|
|
1929
2501
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2015,6 +2587,76 @@ export namespace storagetransfer_v1 {
|
|
|
2015
2587
|
|
|
2016
2588
|
/**
|
|
2017
2589
|
* 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).
|
|
2590
|
+
* @example
|
|
2591
|
+
* ```js
|
|
2592
|
+
* // Before running the sample:
|
|
2593
|
+
* // - Enable the API at:
|
|
2594
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2595
|
+
* // - Login into gcloud by running:
|
|
2596
|
+
* // ```sh
|
|
2597
|
+
* // $ gcloud auth application-default login
|
|
2598
|
+
* // ```
|
|
2599
|
+
* // - Install the npm module by running:
|
|
2600
|
+
* // ```sh
|
|
2601
|
+
* // $ npm install googleapis
|
|
2602
|
+
* // ```
|
|
2603
|
+
*
|
|
2604
|
+
* const {google} = require('googleapis');
|
|
2605
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2606
|
+
*
|
|
2607
|
+
* async function main() {
|
|
2608
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2609
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2610
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2611
|
+
* });
|
|
2612
|
+
*
|
|
2613
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2614
|
+
* const authClient = await auth.getClient();
|
|
2615
|
+
* google.options({auth: authClient});
|
|
2616
|
+
*
|
|
2617
|
+
* // Do the magic
|
|
2618
|
+
* const res = await storagetransfer.transferJobs.patch({
|
|
2619
|
+
* // Required. The name of job to update.
|
|
2620
|
+
* jobName: 'transferJobs/.*',
|
|
2621
|
+
*
|
|
2622
|
+
* // Request body metadata
|
|
2623
|
+
* requestBody: {
|
|
2624
|
+
* // request body parameters
|
|
2625
|
+
* // {
|
|
2626
|
+
* // "projectId": "my_projectId",
|
|
2627
|
+
* // "transferJob": {},
|
|
2628
|
+
* // "updateTransferJobFieldMask": "my_updateTransferJobFieldMask"
|
|
2629
|
+
* // }
|
|
2630
|
+
* },
|
|
2631
|
+
* });
|
|
2632
|
+
* console.log(res.data);
|
|
2633
|
+
*
|
|
2634
|
+
* // Example response
|
|
2635
|
+
* // {
|
|
2636
|
+
* // "creationTime": "my_creationTime",
|
|
2637
|
+
* // "deletionTime": "my_deletionTime",
|
|
2638
|
+
* // "description": "my_description",
|
|
2639
|
+
* // "eventStream": {},
|
|
2640
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
2641
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
2642
|
+
* // "loggingConfig": {},
|
|
2643
|
+
* // "name": "my_name",
|
|
2644
|
+
* // "notificationConfig": {},
|
|
2645
|
+
* // "projectId": "my_projectId",
|
|
2646
|
+
* // "replicationSpec": {},
|
|
2647
|
+
* // "schedule": {},
|
|
2648
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
2649
|
+
* // "status": "my_status",
|
|
2650
|
+
* // "transferSpec": {}
|
|
2651
|
+
* // }
|
|
2652
|
+
* }
|
|
2653
|
+
*
|
|
2654
|
+
* main().catch(e => {
|
|
2655
|
+
* console.error(e);
|
|
2656
|
+
* throw e;
|
|
2657
|
+
* });
|
|
2658
|
+
*
|
|
2659
|
+
* ```
|
|
2018
2660
|
*
|
|
2019
2661
|
* @param params - Parameters for request
|
|
2020
2662
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2104,6 +2746,64 @@ export namespace storagetransfer_v1 {
|
|
|
2104
2746
|
|
|
2105
2747
|
/**
|
|
2106
2748
|
* 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.
|
|
2749
|
+
* @example
|
|
2750
|
+
* ```js
|
|
2751
|
+
* // Before running the sample:
|
|
2752
|
+
* // - Enable the API at:
|
|
2753
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2754
|
+
* // - Login into gcloud by running:
|
|
2755
|
+
* // ```sh
|
|
2756
|
+
* // $ gcloud auth application-default login
|
|
2757
|
+
* // ```
|
|
2758
|
+
* // - Install the npm module by running:
|
|
2759
|
+
* // ```sh
|
|
2760
|
+
* // $ npm install googleapis
|
|
2761
|
+
* // ```
|
|
2762
|
+
*
|
|
2763
|
+
* const {google} = require('googleapis');
|
|
2764
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2765
|
+
*
|
|
2766
|
+
* async function main() {
|
|
2767
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2768
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2769
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2770
|
+
* });
|
|
2771
|
+
*
|
|
2772
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2773
|
+
* const authClient = await auth.getClient();
|
|
2774
|
+
* google.options({auth: authClient});
|
|
2775
|
+
*
|
|
2776
|
+
* // Do the magic
|
|
2777
|
+
* const res = await storagetransfer.transferJobs.run({
|
|
2778
|
+
* // Required. The name of the transfer job.
|
|
2779
|
+
* jobName: 'transferJobs/.*',
|
|
2780
|
+
*
|
|
2781
|
+
* // Request body metadata
|
|
2782
|
+
* requestBody: {
|
|
2783
|
+
* // request body parameters
|
|
2784
|
+
* // {
|
|
2785
|
+
* // "projectId": "my_projectId"
|
|
2786
|
+
* // }
|
|
2787
|
+
* },
|
|
2788
|
+
* });
|
|
2789
|
+
* console.log(res.data);
|
|
2790
|
+
*
|
|
2791
|
+
* // Example response
|
|
2792
|
+
* // {
|
|
2793
|
+
* // "done": false,
|
|
2794
|
+
* // "error": {},
|
|
2795
|
+
* // "metadata": {},
|
|
2796
|
+
* // "name": "my_name",
|
|
2797
|
+
* // "response": {}
|
|
2798
|
+
* // }
|
|
2799
|
+
* }
|
|
2800
|
+
*
|
|
2801
|
+
* main().catch(e => {
|
|
2802
|
+
* console.error(e);
|
|
2803
|
+
* throw e;
|
|
2804
|
+
* });
|
|
2805
|
+
*
|
|
2806
|
+
* ```
|
|
2107
2807
|
*
|
|
2108
2808
|
* @param params - Parameters for request
|
|
2109
2809
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2266,6 +2966,56 @@ export namespace storagetransfer_v1 {
|
|
|
2266
2966
|
|
|
2267
2967
|
/**
|
|
2268
2968
|
* 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.
|
|
2969
|
+
* @example
|
|
2970
|
+
* ```js
|
|
2971
|
+
* // Before running the sample:
|
|
2972
|
+
* // - Enable the API at:
|
|
2973
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2974
|
+
* // - Login into gcloud by running:
|
|
2975
|
+
* // ```sh
|
|
2976
|
+
* // $ gcloud auth application-default login
|
|
2977
|
+
* // ```
|
|
2978
|
+
* // - Install the npm module by running:
|
|
2979
|
+
* // ```sh
|
|
2980
|
+
* // $ npm install googleapis
|
|
2981
|
+
* // ```
|
|
2982
|
+
*
|
|
2983
|
+
* const {google} = require('googleapis');
|
|
2984
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2985
|
+
*
|
|
2986
|
+
* async function main() {
|
|
2987
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2988
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2989
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2990
|
+
* });
|
|
2991
|
+
*
|
|
2992
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2993
|
+
* const authClient = await auth.getClient();
|
|
2994
|
+
* google.options({auth: authClient});
|
|
2995
|
+
*
|
|
2996
|
+
* // Do the magic
|
|
2997
|
+
* const res = await storagetransfer.transferOperations.cancel({
|
|
2998
|
+
* // The name of the operation resource to be cancelled.
|
|
2999
|
+
* name: 'transferOperations/.*',
|
|
3000
|
+
*
|
|
3001
|
+
* // Request body metadata
|
|
3002
|
+
* requestBody: {
|
|
3003
|
+
* // request body parameters
|
|
3004
|
+
* // {}
|
|
3005
|
+
* },
|
|
3006
|
+
* });
|
|
3007
|
+
* console.log(res.data);
|
|
3008
|
+
*
|
|
3009
|
+
* // Example response
|
|
3010
|
+
* // {}
|
|
3011
|
+
* }
|
|
3012
|
+
*
|
|
3013
|
+
* main().catch(e => {
|
|
3014
|
+
* console.error(e);
|
|
3015
|
+
* throw e;
|
|
3016
|
+
* });
|
|
3017
|
+
*
|
|
3018
|
+
* ```
|
|
2269
3019
|
*
|
|
2270
3020
|
* @param params - Parameters for request
|
|
2271
3021
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2355,6 +3105,56 @@ export namespace storagetransfer_v1 {
|
|
|
2355
3105
|
|
|
2356
3106
|
/**
|
|
2357
3107
|
* 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.
|
|
3108
|
+
* @example
|
|
3109
|
+
* ```js
|
|
3110
|
+
* // Before running the sample:
|
|
3111
|
+
* // - Enable the API at:
|
|
3112
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
3113
|
+
* // - Login into gcloud by running:
|
|
3114
|
+
* // ```sh
|
|
3115
|
+
* // $ gcloud auth application-default login
|
|
3116
|
+
* // ```
|
|
3117
|
+
* // - Install the npm module by running:
|
|
3118
|
+
* // ```sh
|
|
3119
|
+
* // $ npm install googleapis
|
|
3120
|
+
* // ```
|
|
3121
|
+
*
|
|
3122
|
+
* const {google} = require('googleapis');
|
|
3123
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
3124
|
+
*
|
|
3125
|
+
* async function main() {
|
|
3126
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3127
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3128
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3129
|
+
* });
|
|
3130
|
+
*
|
|
3131
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3132
|
+
* const authClient = await auth.getClient();
|
|
3133
|
+
* google.options({auth: authClient});
|
|
3134
|
+
*
|
|
3135
|
+
* // Do the magic
|
|
3136
|
+
* const res = await storagetransfer.transferOperations.get({
|
|
3137
|
+
* // The name of the operation resource.
|
|
3138
|
+
* name: 'transferOperations/.*',
|
|
3139
|
+
* });
|
|
3140
|
+
* console.log(res.data);
|
|
3141
|
+
*
|
|
3142
|
+
* // Example response
|
|
3143
|
+
* // {
|
|
3144
|
+
* // "done": false,
|
|
3145
|
+
* // "error": {},
|
|
3146
|
+
* // "metadata": {},
|
|
3147
|
+
* // "name": "my_name",
|
|
3148
|
+
* // "response": {}
|
|
3149
|
+
* // }
|
|
3150
|
+
* }
|
|
3151
|
+
*
|
|
3152
|
+
* main().catch(e => {
|
|
3153
|
+
* console.error(e);
|
|
3154
|
+
* throw e;
|
|
3155
|
+
* });
|
|
3156
|
+
*
|
|
3157
|
+
* ```
|
|
2358
3158
|
*
|
|
2359
3159
|
* @param params - Parameters for request
|
|
2360
3160
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2444,6 +3244,59 @@ export namespace storagetransfer_v1 {
|
|
|
2444
3244
|
|
|
2445
3245
|
/**
|
|
2446
3246
|
* Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.
|
|
3247
|
+
* @example
|
|
3248
|
+
* ```js
|
|
3249
|
+
* // Before running the sample:
|
|
3250
|
+
* // - Enable the API at:
|
|
3251
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
3252
|
+
* // - Login into gcloud by running:
|
|
3253
|
+
* // ```sh
|
|
3254
|
+
* // $ gcloud auth application-default login
|
|
3255
|
+
* // ```
|
|
3256
|
+
* // - Install the npm module by running:
|
|
3257
|
+
* // ```sh
|
|
3258
|
+
* // $ npm install googleapis
|
|
3259
|
+
* // ```
|
|
3260
|
+
*
|
|
3261
|
+
* const {google} = require('googleapis');
|
|
3262
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
3263
|
+
*
|
|
3264
|
+
* async function main() {
|
|
3265
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3266
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3267
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3268
|
+
* });
|
|
3269
|
+
*
|
|
3270
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3271
|
+
* const authClient = await auth.getClient();
|
|
3272
|
+
* google.options({auth: authClient});
|
|
3273
|
+
*
|
|
3274
|
+
* // Do the magic
|
|
3275
|
+
* const res = await storagetransfer.transferOperations.list({
|
|
3276
|
+
* // Required. A list of query parameters specified as JSON text in the form of: `{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobNamePattern": "job_name_pattern", "operationNames":["opid1","opid2",...], "operationNamePattern": "operation_name_pattern", "minCreationTime": "min_creation_time", "maxCreationTime": "max_creation_time", "transferStatuses":["status1","status2",...]\}` Since `jobNames`, `operationNames`, and `transferStatuses` support multiple values, they must be specified with array notation. `projectId` is the only argument that is required. If specified, `jobNamePattern` and `operationNamePattern` must match the full job or operation name respectively. '*' is a wildcard matching 0 or more characters. `minCreationTime` and `maxCreationTime` should be timestamps encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The valid values for `transferStatuses` are case-insensitive: IN_PROGRESS, PAUSED, SUCCESS, FAILED, and ABORTED.
|
|
3277
|
+
* filter: 'placeholder-value',
|
|
3278
|
+
* // Required. The name of the type being listed; must be `transferOperations`.
|
|
3279
|
+
* name: 'transferOperations',
|
|
3280
|
+
* // The list page size. The max allowed value is 256.
|
|
3281
|
+
* pageSize: 'placeholder-value',
|
|
3282
|
+
* // The list page token.
|
|
3283
|
+
* pageToken: 'placeholder-value',
|
|
3284
|
+
* });
|
|
3285
|
+
* console.log(res.data);
|
|
3286
|
+
*
|
|
3287
|
+
* // Example response
|
|
3288
|
+
* // {
|
|
3289
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3290
|
+
* // "operations": []
|
|
3291
|
+
* // }
|
|
3292
|
+
* }
|
|
3293
|
+
*
|
|
3294
|
+
* main().catch(e => {
|
|
3295
|
+
* console.error(e);
|
|
3296
|
+
* throw e;
|
|
3297
|
+
* });
|
|
3298
|
+
*
|
|
3299
|
+
* ```
|
|
2447
3300
|
*
|
|
2448
3301
|
* @param params - Parameters for request
|
|
2449
3302
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2535,6 +3388,56 @@ export namespace storagetransfer_v1 {
|
|
|
2535
3388
|
|
|
2536
3389
|
/**
|
|
2537
3390
|
* Pauses a transfer operation.
|
|
3391
|
+
* @example
|
|
3392
|
+
* ```js
|
|
3393
|
+
* // Before running the sample:
|
|
3394
|
+
* // - Enable the API at:
|
|
3395
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
3396
|
+
* // - Login into gcloud by running:
|
|
3397
|
+
* // ```sh
|
|
3398
|
+
* // $ gcloud auth application-default login
|
|
3399
|
+
* // ```
|
|
3400
|
+
* // - Install the npm module by running:
|
|
3401
|
+
* // ```sh
|
|
3402
|
+
* // $ npm install googleapis
|
|
3403
|
+
* // ```
|
|
3404
|
+
*
|
|
3405
|
+
* const {google} = require('googleapis');
|
|
3406
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
3407
|
+
*
|
|
3408
|
+
* async function main() {
|
|
3409
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3410
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3411
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3412
|
+
* });
|
|
3413
|
+
*
|
|
3414
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3415
|
+
* const authClient = await auth.getClient();
|
|
3416
|
+
* google.options({auth: authClient});
|
|
3417
|
+
*
|
|
3418
|
+
* // Do the magic
|
|
3419
|
+
* const res = await storagetransfer.transferOperations.pause({
|
|
3420
|
+
* // Required. The name of the transfer operation.
|
|
3421
|
+
* name: 'transferOperations/.*',
|
|
3422
|
+
*
|
|
3423
|
+
* // Request body metadata
|
|
3424
|
+
* requestBody: {
|
|
3425
|
+
* // request body parameters
|
|
3426
|
+
* // {}
|
|
3427
|
+
* },
|
|
3428
|
+
* });
|
|
3429
|
+
* console.log(res.data);
|
|
3430
|
+
*
|
|
3431
|
+
* // Example response
|
|
3432
|
+
* // {}
|
|
3433
|
+
* }
|
|
3434
|
+
*
|
|
3435
|
+
* main().catch(e => {
|
|
3436
|
+
* console.error(e);
|
|
3437
|
+
* throw e;
|
|
3438
|
+
* });
|
|
3439
|
+
*
|
|
3440
|
+
* ```
|
|
2538
3441
|
*
|
|
2539
3442
|
* @param params - Parameters for request
|
|
2540
3443
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2624,6 +3527,56 @@ export namespace storagetransfer_v1 {
|
|
|
2624
3527
|
|
|
2625
3528
|
/**
|
|
2626
3529
|
* Resumes a transfer operation that is paused.
|
|
3530
|
+
* @example
|
|
3531
|
+
* ```js
|
|
3532
|
+
* // Before running the sample:
|
|
3533
|
+
* // - Enable the API at:
|
|
3534
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
3535
|
+
* // - Login into gcloud by running:
|
|
3536
|
+
* // ```sh
|
|
3537
|
+
* // $ gcloud auth application-default login
|
|
3538
|
+
* // ```
|
|
3539
|
+
* // - Install the npm module by running:
|
|
3540
|
+
* // ```sh
|
|
3541
|
+
* // $ npm install googleapis
|
|
3542
|
+
* // ```
|
|
3543
|
+
*
|
|
3544
|
+
* const {google} = require('googleapis');
|
|
3545
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
3546
|
+
*
|
|
3547
|
+
* async function main() {
|
|
3548
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3549
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3550
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3551
|
+
* });
|
|
3552
|
+
*
|
|
3553
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3554
|
+
* const authClient = await auth.getClient();
|
|
3555
|
+
* google.options({auth: authClient});
|
|
3556
|
+
*
|
|
3557
|
+
* // Do the magic
|
|
3558
|
+
* const res = await storagetransfer.transferOperations.resume({
|
|
3559
|
+
* // Required. The name of the transfer operation.
|
|
3560
|
+
* name: 'transferOperations/.*',
|
|
3561
|
+
*
|
|
3562
|
+
* // Request body metadata
|
|
3563
|
+
* requestBody: {
|
|
3564
|
+
* // request body parameters
|
|
3565
|
+
* // {}
|
|
3566
|
+
* },
|
|
3567
|
+
* });
|
|
3568
|
+
* console.log(res.data);
|
|
3569
|
+
*
|
|
3570
|
+
* // Example response
|
|
3571
|
+
* // {}
|
|
3572
|
+
* }
|
|
3573
|
+
*
|
|
3574
|
+
* main().catch(e => {
|
|
3575
|
+
* console.error(e);
|
|
3576
|
+
* throw e;
|
|
3577
|
+
* });
|
|
3578
|
+
*
|
|
3579
|
+
* ```
|
|
2627
3580
|
*
|
|
2628
3581
|
* @param params - Parameters for request
|
|
2629
3582
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|