@googleapis/storagetransfer 8.0.1 → 9.1.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 +29 -0
- package/build/v1.d.ts +954 -1
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +954 -1
package/build/v1.d.ts
CHANGED
|
@@ -182,6 +182,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
182
182
|
* 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\}`
|
|
183
183
|
*/
|
|
184
184
|
credentialsSecret?: string | null;
|
|
185
|
+
/**
|
|
186
|
+
* Optional. Federated identity config of a user registered Azure application. If `federated_identity_config` is specified, do not specify azure_credentials or credentials_secret.
|
|
187
|
+
*/
|
|
188
|
+
federatedIdentityConfig?: Schema$FederatedIdentityConfig;
|
|
185
189
|
/**
|
|
186
190
|
* 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 '/'.
|
|
187
191
|
*/
|
|
@@ -283,6 +287,19 @@ export declare namespace storagetransfer_v1 {
|
|
|
283
287
|
*/
|
|
284
288
|
name?: string | null;
|
|
285
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* 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).
|
|
292
|
+
*/
|
|
293
|
+
export interface Schema$FederatedIdentityConfig {
|
|
294
|
+
/**
|
|
295
|
+
* Required. The client (application) ID of the application with federated credentials.
|
|
296
|
+
*/
|
|
297
|
+
clientId?: string | null;
|
|
298
|
+
/**
|
|
299
|
+
* Required. The tenant (directory) ID of the application with federated credentials.
|
|
300
|
+
*/
|
|
301
|
+
tenantId?: string | null;
|
|
302
|
+
}
|
|
286
303
|
/**
|
|
287
304
|
* 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.
|
|
288
305
|
*/
|
|
@@ -780,7 +797,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
780
797
|
*/
|
|
781
798
|
schedule?: Schema$Schedule;
|
|
782
799
|
/**
|
|
783
|
-
* Optional. The service account to
|
|
800
|
+
* 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.
|
|
784
801
|
*/
|
|
785
802
|
serviceAccount?: string | null;
|
|
786
803
|
/**
|
|
@@ -962,6 +979,53 @@ export declare namespace storagetransfer_v1 {
|
|
|
962
979
|
constructor(context: APIRequestContext);
|
|
963
980
|
/**
|
|
964
981
|
* 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.
|
|
982
|
+
* @example
|
|
983
|
+
* ```js
|
|
984
|
+
* // Before running the sample:
|
|
985
|
+
* // - Enable the API at:
|
|
986
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
987
|
+
* // - Login into gcloud by running:
|
|
988
|
+
* // ```sh
|
|
989
|
+
* // $ gcloud auth application-default login
|
|
990
|
+
* // ```
|
|
991
|
+
* // - Install the npm module by running:
|
|
992
|
+
* // ```sh
|
|
993
|
+
* // $ npm install googleapis
|
|
994
|
+
* // ```
|
|
995
|
+
*
|
|
996
|
+
* const {google} = require('googleapis');
|
|
997
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
998
|
+
*
|
|
999
|
+
* async function main() {
|
|
1000
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1001
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1002
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1003
|
+
* });
|
|
1004
|
+
*
|
|
1005
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1006
|
+
* const authClient = await auth.getClient();
|
|
1007
|
+
* google.options({auth: authClient});
|
|
1008
|
+
*
|
|
1009
|
+
* // Do the magic
|
|
1010
|
+
* const res = await storagetransfer.googleServiceAccounts.get({
|
|
1011
|
+
* // Required. The ID of the Google Cloud project that the Google service account is associated with.
|
|
1012
|
+
* projectId: 'placeholder-value',
|
|
1013
|
+
* });
|
|
1014
|
+
* console.log(res.data);
|
|
1015
|
+
*
|
|
1016
|
+
* // Example response
|
|
1017
|
+
* // {
|
|
1018
|
+
* // "accountEmail": "my_accountEmail",
|
|
1019
|
+
* // "subjectId": "my_subjectId"
|
|
1020
|
+
* // }
|
|
1021
|
+
* }
|
|
1022
|
+
*
|
|
1023
|
+
* main().catch(e => {
|
|
1024
|
+
* console.error(e);
|
|
1025
|
+
* throw e;
|
|
1026
|
+
* });
|
|
1027
|
+
*
|
|
1028
|
+
* ```
|
|
965
1029
|
*
|
|
966
1030
|
* @param params - Parameters for request
|
|
967
1031
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -991,6 +1055,68 @@ export declare namespace storagetransfer_v1 {
|
|
|
991
1055
|
constructor(context: APIRequestContext);
|
|
992
1056
|
/**
|
|
993
1057
|
* Creates an agent pool resource.
|
|
1058
|
+
* @example
|
|
1059
|
+
* ```js
|
|
1060
|
+
* // Before running the sample:
|
|
1061
|
+
* // - Enable the API at:
|
|
1062
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1063
|
+
* // - Login into gcloud by running:
|
|
1064
|
+
* // ```sh
|
|
1065
|
+
* // $ gcloud auth application-default login
|
|
1066
|
+
* // ```
|
|
1067
|
+
* // - Install the npm module by running:
|
|
1068
|
+
* // ```sh
|
|
1069
|
+
* // $ npm install googleapis
|
|
1070
|
+
* // ```
|
|
1071
|
+
*
|
|
1072
|
+
* const {google} = require('googleapis');
|
|
1073
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1074
|
+
*
|
|
1075
|
+
* async function main() {
|
|
1076
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1077
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1078
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1079
|
+
* });
|
|
1080
|
+
*
|
|
1081
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1082
|
+
* const authClient = await auth.getClient();
|
|
1083
|
+
* google.options({auth: authClient});
|
|
1084
|
+
*
|
|
1085
|
+
* // Do the magic
|
|
1086
|
+
* const res = await storagetransfer.projects.agentPools.create({
|
|
1087
|
+
* // 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])?$`.
|
|
1088
|
+
* agentPoolId: 'placeholder-value',
|
|
1089
|
+
* // Required. The ID of the Google Cloud project that owns the agent pool.
|
|
1090
|
+
* projectId: '[^/]+',
|
|
1091
|
+
*
|
|
1092
|
+
* // Request body metadata
|
|
1093
|
+
* requestBody: {
|
|
1094
|
+
* // request body parameters
|
|
1095
|
+
* // {
|
|
1096
|
+
* // "bandwidthLimit": {},
|
|
1097
|
+
* // "displayName": "my_displayName",
|
|
1098
|
+
* // "name": "my_name",
|
|
1099
|
+
* // "state": "my_state"
|
|
1100
|
+
* // }
|
|
1101
|
+
* },
|
|
1102
|
+
* });
|
|
1103
|
+
* console.log(res.data);
|
|
1104
|
+
*
|
|
1105
|
+
* // Example response
|
|
1106
|
+
* // {
|
|
1107
|
+
* // "bandwidthLimit": {},
|
|
1108
|
+
* // "displayName": "my_displayName",
|
|
1109
|
+
* // "name": "my_name",
|
|
1110
|
+
* // "state": "my_state"
|
|
1111
|
+
* // }
|
|
1112
|
+
* }
|
|
1113
|
+
*
|
|
1114
|
+
* main().catch(e => {
|
|
1115
|
+
* console.error(e);
|
|
1116
|
+
* throw e;
|
|
1117
|
+
* });
|
|
1118
|
+
*
|
|
1119
|
+
* ```
|
|
994
1120
|
*
|
|
995
1121
|
* @param params - Parameters for request
|
|
996
1122
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1005,6 +1131,50 @@ export declare namespace storagetransfer_v1 {
|
|
|
1005
1131
|
create(callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1006
1132
|
/**
|
|
1007
1133
|
* Deletes an agent pool.
|
|
1134
|
+
* @example
|
|
1135
|
+
* ```js
|
|
1136
|
+
* // Before running the sample:
|
|
1137
|
+
* // - Enable the API at:
|
|
1138
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1139
|
+
* // - Login into gcloud by running:
|
|
1140
|
+
* // ```sh
|
|
1141
|
+
* // $ gcloud auth application-default login
|
|
1142
|
+
* // ```
|
|
1143
|
+
* // - Install the npm module by running:
|
|
1144
|
+
* // ```sh
|
|
1145
|
+
* // $ npm install googleapis
|
|
1146
|
+
* // ```
|
|
1147
|
+
*
|
|
1148
|
+
* const {google} = require('googleapis');
|
|
1149
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1150
|
+
*
|
|
1151
|
+
* async function main() {
|
|
1152
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1153
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1154
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1155
|
+
* });
|
|
1156
|
+
*
|
|
1157
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1158
|
+
* const authClient = await auth.getClient();
|
|
1159
|
+
* google.options({auth: authClient});
|
|
1160
|
+
*
|
|
1161
|
+
* // Do the magic
|
|
1162
|
+
* const res = await storagetransfer.projects.agentPools.delete({
|
|
1163
|
+
* // Required. The name of the agent pool to delete.
|
|
1164
|
+
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1165
|
+
* });
|
|
1166
|
+
* console.log(res.data);
|
|
1167
|
+
*
|
|
1168
|
+
* // Example response
|
|
1169
|
+
* // {}
|
|
1170
|
+
* }
|
|
1171
|
+
*
|
|
1172
|
+
* main().catch(e => {
|
|
1173
|
+
* console.error(e);
|
|
1174
|
+
* throw e;
|
|
1175
|
+
* });
|
|
1176
|
+
*
|
|
1177
|
+
* ```
|
|
1008
1178
|
*
|
|
1009
1179
|
* @param params - Parameters for request
|
|
1010
1180
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1019,6 +1189,55 @@ export declare namespace storagetransfer_v1 {
|
|
|
1019
1189
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1020
1190
|
/**
|
|
1021
1191
|
* Gets an agent pool.
|
|
1192
|
+
* @example
|
|
1193
|
+
* ```js
|
|
1194
|
+
* // Before running the sample:
|
|
1195
|
+
* // - Enable the API at:
|
|
1196
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1197
|
+
* // - Login into gcloud by running:
|
|
1198
|
+
* // ```sh
|
|
1199
|
+
* // $ gcloud auth application-default login
|
|
1200
|
+
* // ```
|
|
1201
|
+
* // - Install the npm module by running:
|
|
1202
|
+
* // ```sh
|
|
1203
|
+
* // $ npm install googleapis
|
|
1204
|
+
* // ```
|
|
1205
|
+
*
|
|
1206
|
+
* const {google} = require('googleapis');
|
|
1207
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1208
|
+
*
|
|
1209
|
+
* async function main() {
|
|
1210
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1211
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1212
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1213
|
+
* });
|
|
1214
|
+
*
|
|
1215
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1216
|
+
* const authClient = await auth.getClient();
|
|
1217
|
+
* google.options({auth: authClient});
|
|
1218
|
+
*
|
|
1219
|
+
* // Do the magic
|
|
1220
|
+
* const res = await storagetransfer.projects.agentPools.get({
|
|
1221
|
+
* // Required. The name of the agent pool to get.
|
|
1222
|
+
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1223
|
+
* });
|
|
1224
|
+
* console.log(res.data);
|
|
1225
|
+
*
|
|
1226
|
+
* // Example response
|
|
1227
|
+
* // {
|
|
1228
|
+
* // "bandwidthLimit": {},
|
|
1229
|
+
* // "displayName": "my_displayName",
|
|
1230
|
+
* // "name": "my_name",
|
|
1231
|
+
* // "state": "my_state"
|
|
1232
|
+
* // }
|
|
1233
|
+
* }
|
|
1234
|
+
*
|
|
1235
|
+
* main().catch(e => {
|
|
1236
|
+
* console.error(e);
|
|
1237
|
+
* throw e;
|
|
1238
|
+
* });
|
|
1239
|
+
*
|
|
1240
|
+
* ```
|
|
1022
1241
|
*
|
|
1023
1242
|
* @param params - Parameters for request
|
|
1024
1243
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1033,6 +1252,59 @@ export declare namespace storagetransfer_v1 {
|
|
|
1033
1252
|
get(callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1034
1253
|
/**
|
|
1035
1254
|
* Lists agent pools.
|
|
1255
|
+
* @example
|
|
1256
|
+
* ```js
|
|
1257
|
+
* // Before running the sample:
|
|
1258
|
+
* // - Enable the API at:
|
|
1259
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1260
|
+
* // - Login into gcloud by running:
|
|
1261
|
+
* // ```sh
|
|
1262
|
+
* // $ gcloud auth application-default login
|
|
1263
|
+
* // ```
|
|
1264
|
+
* // - Install the npm module by running:
|
|
1265
|
+
* // ```sh
|
|
1266
|
+
* // $ npm install googleapis
|
|
1267
|
+
* // ```
|
|
1268
|
+
*
|
|
1269
|
+
* const {google} = require('googleapis');
|
|
1270
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1271
|
+
*
|
|
1272
|
+
* async function main() {
|
|
1273
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1274
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1275
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1276
|
+
* });
|
|
1277
|
+
*
|
|
1278
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1279
|
+
* const authClient = await auth.getClient();
|
|
1280
|
+
* google.options({auth: authClient});
|
|
1281
|
+
*
|
|
1282
|
+
* // Do the magic
|
|
1283
|
+
* const res = await storagetransfer.projects.agentPools.list({
|
|
1284
|
+
* // 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.
|
|
1285
|
+
* filter: 'placeholder-value',
|
|
1286
|
+
* // The list page size. The max allowed value is `256`.
|
|
1287
|
+
* pageSize: 'placeholder-value',
|
|
1288
|
+
* // The list page token.
|
|
1289
|
+
* pageToken: 'placeholder-value',
|
|
1290
|
+
* // Required. The ID of the Google Cloud project that owns the job.
|
|
1291
|
+
* projectId: '[^/]+',
|
|
1292
|
+
* });
|
|
1293
|
+
* console.log(res.data);
|
|
1294
|
+
*
|
|
1295
|
+
* // Example response
|
|
1296
|
+
* // {
|
|
1297
|
+
* // "agentPools": [],
|
|
1298
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1299
|
+
* // }
|
|
1300
|
+
* }
|
|
1301
|
+
*
|
|
1302
|
+
* main().catch(e => {
|
|
1303
|
+
* console.error(e);
|
|
1304
|
+
* throw e;
|
|
1305
|
+
* });
|
|
1306
|
+
*
|
|
1307
|
+
* ```
|
|
1036
1308
|
*
|
|
1037
1309
|
* @param params - Parameters for request
|
|
1038
1310
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1047,6 +1319,68 @@ export declare namespace storagetransfer_v1 {
|
|
|
1047
1319
|
list(callback: BodyResponseCallback<Schema$ListAgentPoolsResponse>): void;
|
|
1048
1320
|
/**
|
|
1049
1321
|
* Updates an existing agent pool resource.
|
|
1322
|
+
* @example
|
|
1323
|
+
* ```js
|
|
1324
|
+
* // Before running the sample:
|
|
1325
|
+
* // - Enable the API at:
|
|
1326
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1327
|
+
* // - Login into gcloud by running:
|
|
1328
|
+
* // ```sh
|
|
1329
|
+
* // $ gcloud auth application-default login
|
|
1330
|
+
* // ```
|
|
1331
|
+
* // - Install the npm module by running:
|
|
1332
|
+
* // ```sh
|
|
1333
|
+
* // $ npm install googleapis
|
|
1334
|
+
* // ```
|
|
1335
|
+
*
|
|
1336
|
+
* const {google} = require('googleapis');
|
|
1337
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1338
|
+
*
|
|
1339
|
+
* async function main() {
|
|
1340
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1341
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1342
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1343
|
+
* });
|
|
1344
|
+
*
|
|
1345
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1346
|
+
* const authClient = await auth.getClient();
|
|
1347
|
+
* google.options({auth: authClient});
|
|
1348
|
+
*
|
|
1349
|
+
* // Do the magic
|
|
1350
|
+
* const res = await storagetransfer.projects.agentPools.patch({
|
|
1351
|
+
* // Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id\}/agentPools/{agent_pool_id\}`
|
|
1352
|
+
* name: 'projects/my-project/agentPools/my-agentPool',
|
|
1353
|
+
* // 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
|
|
1354
|
+
* updateMask: 'placeholder-value',
|
|
1355
|
+
*
|
|
1356
|
+
* // Request body metadata
|
|
1357
|
+
* requestBody: {
|
|
1358
|
+
* // request body parameters
|
|
1359
|
+
* // {
|
|
1360
|
+
* // "bandwidthLimit": {},
|
|
1361
|
+
* // "displayName": "my_displayName",
|
|
1362
|
+
* // "name": "my_name",
|
|
1363
|
+
* // "state": "my_state"
|
|
1364
|
+
* // }
|
|
1365
|
+
* },
|
|
1366
|
+
* });
|
|
1367
|
+
* console.log(res.data);
|
|
1368
|
+
*
|
|
1369
|
+
* // Example response
|
|
1370
|
+
* // {
|
|
1371
|
+
* // "bandwidthLimit": {},
|
|
1372
|
+
* // "displayName": "my_displayName",
|
|
1373
|
+
* // "name": "my_name",
|
|
1374
|
+
* // "state": "my_state"
|
|
1375
|
+
* // }
|
|
1376
|
+
* }
|
|
1377
|
+
*
|
|
1378
|
+
* main().catch(e => {
|
|
1379
|
+
* console.error(e);
|
|
1380
|
+
* throw e;
|
|
1381
|
+
* });
|
|
1382
|
+
*
|
|
1383
|
+
* ```
|
|
1050
1384
|
*
|
|
1051
1385
|
* @param params - Parameters for request
|
|
1052
1386
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1123,6 +1457,85 @@ export declare namespace storagetransfer_v1 {
|
|
|
1123
1457
|
constructor(context: APIRequestContext);
|
|
1124
1458
|
/**
|
|
1125
1459
|
* Creates a transfer job that runs periodically.
|
|
1460
|
+
* @example
|
|
1461
|
+
* ```js
|
|
1462
|
+
* // Before running the sample:
|
|
1463
|
+
* // - Enable the API at:
|
|
1464
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1465
|
+
* // - Login into gcloud by running:
|
|
1466
|
+
* // ```sh
|
|
1467
|
+
* // $ gcloud auth application-default login
|
|
1468
|
+
* // ```
|
|
1469
|
+
* // - Install the npm module by running:
|
|
1470
|
+
* // ```sh
|
|
1471
|
+
* // $ npm install googleapis
|
|
1472
|
+
* // ```
|
|
1473
|
+
*
|
|
1474
|
+
* const {google} = require('googleapis');
|
|
1475
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1476
|
+
*
|
|
1477
|
+
* async function main() {
|
|
1478
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1479
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1480
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1481
|
+
* });
|
|
1482
|
+
*
|
|
1483
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1484
|
+
* const authClient = await auth.getClient();
|
|
1485
|
+
* google.options({auth: authClient});
|
|
1486
|
+
*
|
|
1487
|
+
* // Do the magic
|
|
1488
|
+
* const res = await storagetransfer.transferJobs.create({
|
|
1489
|
+
* // Request body metadata
|
|
1490
|
+
* requestBody: {
|
|
1491
|
+
* // request body parameters
|
|
1492
|
+
* // {
|
|
1493
|
+
* // "creationTime": "my_creationTime",
|
|
1494
|
+
* // "deletionTime": "my_deletionTime",
|
|
1495
|
+
* // "description": "my_description",
|
|
1496
|
+
* // "eventStream": {},
|
|
1497
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
1498
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
1499
|
+
* // "loggingConfig": {},
|
|
1500
|
+
* // "name": "my_name",
|
|
1501
|
+
* // "notificationConfig": {},
|
|
1502
|
+
* // "projectId": "my_projectId",
|
|
1503
|
+
* // "replicationSpec": {},
|
|
1504
|
+
* // "schedule": {},
|
|
1505
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1506
|
+
* // "status": "my_status",
|
|
1507
|
+
* // "transferSpec": {}
|
|
1508
|
+
* // }
|
|
1509
|
+
* },
|
|
1510
|
+
* });
|
|
1511
|
+
* console.log(res.data);
|
|
1512
|
+
*
|
|
1513
|
+
* // Example response
|
|
1514
|
+
* // {
|
|
1515
|
+
* // "creationTime": "my_creationTime",
|
|
1516
|
+
* // "deletionTime": "my_deletionTime",
|
|
1517
|
+
* // "description": "my_description",
|
|
1518
|
+
* // "eventStream": {},
|
|
1519
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
1520
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
1521
|
+
* // "loggingConfig": {},
|
|
1522
|
+
* // "name": "my_name",
|
|
1523
|
+
* // "notificationConfig": {},
|
|
1524
|
+
* // "projectId": "my_projectId",
|
|
1525
|
+
* // "replicationSpec": {},
|
|
1526
|
+
* // "schedule": {},
|
|
1527
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1528
|
+
* // "status": "my_status",
|
|
1529
|
+
* // "transferSpec": {}
|
|
1530
|
+
* // }
|
|
1531
|
+
* }
|
|
1532
|
+
*
|
|
1533
|
+
* main().catch(e => {
|
|
1534
|
+
* console.error(e);
|
|
1535
|
+
* throw e;
|
|
1536
|
+
* });
|
|
1537
|
+
*
|
|
1538
|
+
* ```
|
|
1126
1539
|
*
|
|
1127
1540
|
* @param params - Parameters for request
|
|
1128
1541
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1137,6 +1550,52 @@ export declare namespace storagetransfer_v1 {
|
|
|
1137
1550
|
create(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1138
1551
|
/**
|
|
1139
1552
|
* Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
|
|
1553
|
+
* @example
|
|
1554
|
+
* ```js
|
|
1555
|
+
* // Before running the sample:
|
|
1556
|
+
* // - Enable the API at:
|
|
1557
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1558
|
+
* // - Login into gcloud by running:
|
|
1559
|
+
* // ```sh
|
|
1560
|
+
* // $ gcloud auth application-default login
|
|
1561
|
+
* // ```
|
|
1562
|
+
* // - Install the npm module by running:
|
|
1563
|
+
* // ```sh
|
|
1564
|
+
* // $ npm install googleapis
|
|
1565
|
+
* // ```
|
|
1566
|
+
*
|
|
1567
|
+
* const {google} = require('googleapis');
|
|
1568
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1569
|
+
*
|
|
1570
|
+
* async function main() {
|
|
1571
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1572
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1573
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1574
|
+
* });
|
|
1575
|
+
*
|
|
1576
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1577
|
+
* const authClient = await auth.getClient();
|
|
1578
|
+
* google.options({auth: authClient});
|
|
1579
|
+
*
|
|
1580
|
+
* // Do the magic
|
|
1581
|
+
* const res = await storagetransfer.transferJobs.delete({
|
|
1582
|
+
* // Required. The job to delete.
|
|
1583
|
+
* jobName: 'transferJobs/.*',
|
|
1584
|
+
* // Required. The ID of the Google Cloud project that owns the job.
|
|
1585
|
+
* projectId: 'placeholder-value',
|
|
1586
|
+
* });
|
|
1587
|
+
* console.log(res.data);
|
|
1588
|
+
*
|
|
1589
|
+
* // Example response
|
|
1590
|
+
* // {}
|
|
1591
|
+
* }
|
|
1592
|
+
*
|
|
1593
|
+
* main().catch(e => {
|
|
1594
|
+
* console.error(e);
|
|
1595
|
+
* throw e;
|
|
1596
|
+
* });
|
|
1597
|
+
*
|
|
1598
|
+
* ```
|
|
1140
1599
|
*
|
|
1141
1600
|
* @param params - Parameters for request
|
|
1142
1601
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1151,6 +1610,68 @@ export declare namespace storagetransfer_v1 {
|
|
|
1151
1610
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1152
1611
|
/**
|
|
1153
1612
|
* Gets a transfer job.
|
|
1613
|
+
* @example
|
|
1614
|
+
* ```js
|
|
1615
|
+
* // Before running the sample:
|
|
1616
|
+
* // - Enable the API at:
|
|
1617
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1618
|
+
* // - Login into gcloud by running:
|
|
1619
|
+
* // ```sh
|
|
1620
|
+
* // $ gcloud auth application-default login
|
|
1621
|
+
* // ```
|
|
1622
|
+
* // - Install the npm module by running:
|
|
1623
|
+
* // ```sh
|
|
1624
|
+
* // $ npm install googleapis
|
|
1625
|
+
* // ```
|
|
1626
|
+
*
|
|
1627
|
+
* const {google} = require('googleapis');
|
|
1628
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1629
|
+
*
|
|
1630
|
+
* async function main() {
|
|
1631
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1632
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1633
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1634
|
+
* });
|
|
1635
|
+
*
|
|
1636
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1637
|
+
* const authClient = await auth.getClient();
|
|
1638
|
+
* google.options({auth: authClient});
|
|
1639
|
+
*
|
|
1640
|
+
* // Do the magic
|
|
1641
|
+
* const res = await storagetransfer.transferJobs.get({
|
|
1642
|
+
* // Required. The job to get.
|
|
1643
|
+
* jobName: 'transferJobs/.*',
|
|
1644
|
+
* // Required. The ID of the Google Cloud project that owns the job.
|
|
1645
|
+
* projectId: 'placeholder-value',
|
|
1646
|
+
* });
|
|
1647
|
+
* console.log(res.data);
|
|
1648
|
+
*
|
|
1649
|
+
* // Example response
|
|
1650
|
+
* // {
|
|
1651
|
+
* // "creationTime": "my_creationTime",
|
|
1652
|
+
* // "deletionTime": "my_deletionTime",
|
|
1653
|
+
* // "description": "my_description",
|
|
1654
|
+
* // "eventStream": {},
|
|
1655
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
1656
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
1657
|
+
* // "loggingConfig": {},
|
|
1658
|
+
* // "name": "my_name",
|
|
1659
|
+
* // "notificationConfig": {},
|
|
1660
|
+
* // "projectId": "my_projectId",
|
|
1661
|
+
* // "replicationSpec": {},
|
|
1662
|
+
* // "schedule": {},
|
|
1663
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1664
|
+
* // "status": "my_status",
|
|
1665
|
+
* // "transferSpec": {}
|
|
1666
|
+
* // }
|
|
1667
|
+
* }
|
|
1668
|
+
*
|
|
1669
|
+
* main().catch(e => {
|
|
1670
|
+
* console.error(e);
|
|
1671
|
+
* throw e;
|
|
1672
|
+
* });
|
|
1673
|
+
*
|
|
1674
|
+
* ```
|
|
1154
1675
|
*
|
|
1155
1676
|
* @param params - Parameters for request
|
|
1156
1677
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1165,6 +1686,57 @@ export declare namespace storagetransfer_v1 {
|
|
|
1165
1686
|
get(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1166
1687
|
/**
|
|
1167
1688
|
* Lists transfer jobs.
|
|
1689
|
+
* @example
|
|
1690
|
+
* ```js
|
|
1691
|
+
* // Before running the sample:
|
|
1692
|
+
* // - Enable the API at:
|
|
1693
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1694
|
+
* // - Login into gcloud by running:
|
|
1695
|
+
* // ```sh
|
|
1696
|
+
* // $ gcloud auth application-default login
|
|
1697
|
+
* // ```
|
|
1698
|
+
* // - Install the npm module by running:
|
|
1699
|
+
* // ```sh
|
|
1700
|
+
* // $ npm install googleapis
|
|
1701
|
+
* // ```
|
|
1702
|
+
*
|
|
1703
|
+
* const {google} = require('googleapis');
|
|
1704
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1705
|
+
*
|
|
1706
|
+
* async function main() {
|
|
1707
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1708
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1709
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1710
|
+
* });
|
|
1711
|
+
*
|
|
1712
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1713
|
+
* const authClient = await auth.getClient();
|
|
1714
|
+
* google.options({auth: authClient});
|
|
1715
|
+
*
|
|
1716
|
+
* // Do the magic
|
|
1717
|
+
* const res = await storagetransfer.transferJobs.list({
|
|
1718
|
+
* // 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`.
|
|
1719
|
+
* filter: 'placeholder-value',
|
|
1720
|
+
* // The list page size. The max allowed value is 256.
|
|
1721
|
+
* pageSize: 'placeholder-value',
|
|
1722
|
+
* // The list page token.
|
|
1723
|
+
* pageToken: 'placeholder-value',
|
|
1724
|
+
* });
|
|
1725
|
+
* console.log(res.data);
|
|
1726
|
+
*
|
|
1727
|
+
* // Example response
|
|
1728
|
+
* // {
|
|
1729
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1730
|
+
* // "transferJobs": []
|
|
1731
|
+
* // }
|
|
1732
|
+
* }
|
|
1733
|
+
*
|
|
1734
|
+
* main().catch(e => {
|
|
1735
|
+
* console.error(e);
|
|
1736
|
+
* throw e;
|
|
1737
|
+
* });
|
|
1738
|
+
*
|
|
1739
|
+
* ```
|
|
1168
1740
|
*
|
|
1169
1741
|
* @param params - Parameters for request
|
|
1170
1742
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1179,6 +1751,76 @@ export declare namespace storagetransfer_v1 {
|
|
|
1179
1751
|
list(callback: BodyResponseCallback<Schema$ListTransferJobsResponse>): void;
|
|
1180
1752
|
/**
|
|
1181
1753
|
* 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).
|
|
1754
|
+
* @example
|
|
1755
|
+
* ```js
|
|
1756
|
+
* // Before running the sample:
|
|
1757
|
+
* // - Enable the API at:
|
|
1758
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1759
|
+
* // - Login into gcloud by running:
|
|
1760
|
+
* // ```sh
|
|
1761
|
+
* // $ gcloud auth application-default login
|
|
1762
|
+
* // ```
|
|
1763
|
+
* // - Install the npm module by running:
|
|
1764
|
+
* // ```sh
|
|
1765
|
+
* // $ npm install googleapis
|
|
1766
|
+
* // ```
|
|
1767
|
+
*
|
|
1768
|
+
* const {google} = require('googleapis');
|
|
1769
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1770
|
+
*
|
|
1771
|
+
* async function main() {
|
|
1772
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1773
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1774
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1775
|
+
* });
|
|
1776
|
+
*
|
|
1777
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1778
|
+
* const authClient = await auth.getClient();
|
|
1779
|
+
* google.options({auth: authClient});
|
|
1780
|
+
*
|
|
1781
|
+
* // Do the magic
|
|
1782
|
+
* const res = await storagetransfer.transferJobs.patch({
|
|
1783
|
+
* // Required. The name of job to update.
|
|
1784
|
+
* jobName: 'transferJobs/.*',
|
|
1785
|
+
*
|
|
1786
|
+
* // Request body metadata
|
|
1787
|
+
* requestBody: {
|
|
1788
|
+
* // request body parameters
|
|
1789
|
+
* // {
|
|
1790
|
+
* // "projectId": "my_projectId",
|
|
1791
|
+
* // "transferJob": {},
|
|
1792
|
+
* // "updateTransferJobFieldMask": "my_updateTransferJobFieldMask"
|
|
1793
|
+
* // }
|
|
1794
|
+
* },
|
|
1795
|
+
* });
|
|
1796
|
+
* console.log(res.data);
|
|
1797
|
+
*
|
|
1798
|
+
* // Example response
|
|
1799
|
+
* // {
|
|
1800
|
+
* // "creationTime": "my_creationTime",
|
|
1801
|
+
* // "deletionTime": "my_deletionTime",
|
|
1802
|
+
* // "description": "my_description",
|
|
1803
|
+
* // "eventStream": {},
|
|
1804
|
+
* // "lastModificationTime": "my_lastModificationTime",
|
|
1805
|
+
* // "latestOperationName": "my_latestOperationName",
|
|
1806
|
+
* // "loggingConfig": {},
|
|
1807
|
+
* // "name": "my_name",
|
|
1808
|
+
* // "notificationConfig": {},
|
|
1809
|
+
* // "projectId": "my_projectId",
|
|
1810
|
+
* // "replicationSpec": {},
|
|
1811
|
+
* // "schedule": {},
|
|
1812
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1813
|
+
* // "status": "my_status",
|
|
1814
|
+
* // "transferSpec": {}
|
|
1815
|
+
* // }
|
|
1816
|
+
* }
|
|
1817
|
+
*
|
|
1818
|
+
* main().catch(e => {
|
|
1819
|
+
* console.error(e);
|
|
1820
|
+
* throw e;
|
|
1821
|
+
* });
|
|
1822
|
+
*
|
|
1823
|
+
* ```
|
|
1182
1824
|
*
|
|
1183
1825
|
* @param params - Parameters for request
|
|
1184
1826
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1193,6 +1835,64 @@ export declare namespace storagetransfer_v1 {
|
|
|
1193
1835
|
patch(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1194
1836
|
/**
|
|
1195
1837
|
* 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.
|
|
1838
|
+
* @example
|
|
1839
|
+
* ```js
|
|
1840
|
+
* // Before running the sample:
|
|
1841
|
+
* // - Enable the API at:
|
|
1842
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1843
|
+
* // - Login into gcloud by running:
|
|
1844
|
+
* // ```sh
|
|
1845
|
+
* // $ gcloud auth application-default login
|
|
1846
|
+
* // ```
|
|
1847
|
+
* // - Install the npm module by running:
|
|
1848
|
+
* // ```sh
|
|
1849
|
+
* // $ npm install googleapis
|
|
1850
|
+
* // ```
|
|
1851
|
+
*
|
|
1852
|
+
* const {google} = require('googleapis');
|
|
1853
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1854
|
+
*
|
|
1855
|
+
* async function main() {
|
|
1856
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1857
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1858
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1859
|
+
* });
|
|
1860
|
+
*
|
|
1861
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1862
|
+
* const authClient = await auth.getClient();
|
|
1863
|
+
* google.options({auth: authClient});
|
|
1864
|
+
*
|
|
1865
|
+
* // Do the magic
|
|
1866
|
+
* const res = await storagetransfer.transferJobs.run({
|
|
1867
|
+
* // Required. The name of the transfer job.
|
|
1868
|
+
* jobName: 'transferJobs/.*',
|
|
1869
|
+
*
|
|
1870
|
+
* // Request body metadata
|
|
1871
|
+
* requestBody: {
|
|
1872
|
+
* // request body parameters
|
|
1873
|
+
* // {
|
|
1874
|
+
* // "projectId": "my_projectId"
|
|
1875
|
+
* // }
|
|
1876
|
+
* },
|
|
1877
|
+
* });
|
|
1878
|
+
* console.log(res.data);
|
|
1879
|
+
*
|
|
1880
|
+
* // Example response
|
|
1881
|
+
* // {
|
|
1882
|
+
* // "done": false,
|
|
1883
|
+
* // "error": {},
|
|
1884
|
+
* // "metadata": {},
|
|
1885
|
+
* // "name": "my_name",
|
|
1886
|
+
* // "response": {}
|
|
1887
|
+
* // }
|
|
1888
|
+
* }
|
|
1889
|
+
*
|
|
1890
|
+
* main().catch(e => {
|
|
1891
|
+
* console.error(e);
|
|
1892
|
+
* throw e;
|
|
1893
|
+
* });
|
|
1894
|
+
*
|
|
1895
|
+
* ```
|
|
1196
1896
|
*
|
|
1197
1897
|
* @param params - Parameters for request
|
|
1198
1898
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1271,6 +1971,56 @@ export declare namespace storagetransfer_v1 {
|
|
|
1271
1971
|
constructor(context: APIRequestContext);
|
|
1272
1972
|
/**
|
|
1273
1973
|
* 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.
|
|
1974
|
+
* @example
|
|
1975
|
+
* ```js
|
|
1976
|
+
* // Before running the sample:
|
|
1977
|
+
* // - Enable the API at:
|
|
1978
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
1979
|
+
* // - Login into gcloud by running:
|
|
1980
|
+
* // ```sh
|
|
1981
|
+
* // $ gcloud auth application-default login
|
|
1982
|
+
* // ```
|
|
1983
|
+
* // - Install the npm module by running:
|
|
1984
|
+
* // ```sh
|
|
1985
|
+
* // $ npm install googleapis
|
|
1986
|
+
* // ```
|
|
1987
|
+
*
|
|
1988
|
+
* const {google} = require('googleapis');
|
|
1989
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
1990
|
+
*
|
|
1991
|
+
* async function main() {
|
|
1992
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1993
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1994
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1995
|
+
* });
|
|
1996
|
+
*
|
|
1997
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1998
|
+
* const authClient = await auth.getClient();
|
|
1999
|
+
* google.options({auth: authClient});
|
|
2000
|
+
*
|
|
2001
|
+
* // Do the magic
|
|
2002
|
+
* const res = await storagetransfer.transferOperations.cancel({
|
|
2003
|
+
* // The name of the operation resource to be cancelled.
|
|
2004
|
+
* name: 'transferOperations/.*',
|
|
2005
|
+
*
|
|
2006
|
+
* // Request body metadata
|
|
2007
|
+
* requestBody: {
|
|
2008
|
+
* // request body parameters
|
|
2009
|
+
* // {}
|
|
2010
|
+
* },
|
|
2011
|
+
* });
|
|
2012
|
+
* console.log(res.data);
|
|
2013
|
+
*
|
|
2014
|
+
* // Example response
|
|
2015
|
+
* // {}
|
|
2016
|
+
* }
|
|
2017
|
+
*
|
|
2018
|
+
* main().catch(e => {
|
|
2019
|
+
* console.error(e);
|
|
2020
|
+
* throw e;
|
|
2021
|
+
* });
|
|
2022
|
+
*
|
|
2023
|
+
* ```
|
|
1274
2024
|
*
|
|
1275
2025
|
* @param params - Parameters for request
|
|
1276
2026
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1285,6 +2035,56 @@ export declare namespace storagetransfer_v1 {
|
|
|
1285
2035
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1286
2036
|
/**
|
|
1287
2037
|
* 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.
|
|
2038
|
+
* @example
|
|
2039
|
+
* ```js
|
|
2040
|
+
* // Before running the sample:
|
|
2041
|
+
* // - Enable the API at:
|
|
2042
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2043
|
+
* // - Login into gcloud by running:
|
|
2044
|
+
* // ```sh
|
|
2045
|
+
* // $ gcloud auth application-default login
|
|
2046
|
+
* // ```
|
|
2047
|
+
* // - Install the npm module by running:
|
|
2048
|
+
* // ```sh
|
|
2049
|
+
* // $ npm install googleapis
|
|
2050
|
+
* // ```
|
|
2051
|
+
*
|
|
2052
|
+
* const {google} = require('googleapis');
|
|
2053
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2054
|
+
*
|
|
2055
|
+
* async function main() {
|
|
2056
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2057
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2058
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2059
|
+
* });
|
|
2060
|
+
*
|
|
2061
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2062
|
+
* const authClient = await auth.getClient();
|
|
2063
|
+
* google.options({auth: authClient});
|
|
2064
|
+
*
|
|
2065
|
+
* // Do the magic
|
|
2066
|
+
* const res = await storagetransfer.transferOperations.get({
|
|
2067
|
+
* // The name of the operation resource.
|
|
2068
|
+
* name: 'transferOperations/.*',
|
|
2069
|
+
* });
|
|
2070
|
+
* console.log(res.data);
|
|
2071
|
+
*
|
|
2072
|
+
* // Example response
|
|
2073
|
+
* // {
|
|
2074
|
+
* // "done": false,
|
|
2075
|
+
* // "error": {},
|
|
2076
|
+
* // "metadata": {},
|
|
2077
|
+
* // "name": "my_name",
|
|
2078
|
+
* // "response": {}
|
|
2079
|
+
* // }
|
|
2080
|
+
* }
|
|
2081
|
+
*
|
|
2082
|
+
* main().catch(e => {
|
|
2083
|
+
* console.error(e);
|
|
2084
|
+
* throw e;
|
|
2085
|
+
* });
|
|
2086
|
+
*
|
|
2087
|
+
* ```
|
|
1288
2088
|
*
|
|
1289
2089
|
* @param params - Parameters for request
|
|
1290
2090
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1299,6 +2099,59 @@ export declare namespace storagetransfer_v1 {
|
|
|
1299
2099
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1300
2100
|
/**
|
|
1301
2101
|
* Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.
|
|
2102
|
+
* @example
|
|
2103
|
+
* ```js
|
|
2104
|
+
* // Before running the sample:
|
|
2105
|
+
* // - Enable the API at:
|
|
2106
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2107
|
+
* // - Login into gcloud by running:
|
|
2108
|
+
* // ```sh
|
|
2109
|
+
* // $ gcloud auth application-default login
|
|
2110
|
+
* // ```
|
|
2111
|
+
* // - Install the npm module by running:
|
|
2112
|
+
* // ```sh
|
|
2113
|
+
* // $ npm install googleapis
|
|
2114
|
+
* // ```
|
|
2115
|
+
*
|
|
2116
|
+
* const {google} = require('googleapis');
|
|
2117
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2118
|
+
*
|
|
2119
|
+
* async function main() {
|
|
2120
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2121
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2122
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2123
|
+
* });
|
|
2124
|
+
*
|
|
2125
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2126
|
+
* const authClient = await auth.getClient();
|
|
2127
|
+
* google.options({auth: authClient});
|
|
2128
|
+
*
|
|
2129
|
+
* // Do the magic
|
|
2130
|
+
* const res = await storagetransfer.transferOperations.list({
|
|
2131
|
+
* // 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.
|
|
2132
|
+
* filter: 'placeholder-value',
|
|
2133
|
+
* // Required. The name of the type being listed; must be `transferOperations`.
|
|
2134
|
+
* name: 'transferOperations',
|
|
2135
|
+
* // The list page size. The max allowed value is 256.
|
|
2136
|
+
* pageSize: 'placeholder-value',
|
|
2137
|
+
* // The list page token.
|
|
2138
|
+
* pageToken: 'placeholder-value',
|
|
2139
|
+
* });
|
|
2140
|
+
* console.log(res.data);
|
|
2141
|
+
*
|
|
2142
|
+
* // Example response
|
|
2143
|
+
* // {
|
|
2144
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2145
|
+
* // "operations": []
|
|
2146
|
+
* // }
|
|
2147
|
+
* }
|
|
2148
|
+
*
|
|
2149
|
+
* main().catch(e => {
|
|
2150
|
+
* console.error(e);
|
|
2151
|
+
* throw e;
|
|
2152
|
+
* });
|
|
2153
|
+
*
|
|
2154
|
+
* ```
|
|
1302
2155
|
*
|
|
1303
2156
|
* @param params - Parameters for request
|
|
1304
2157
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1313,6 +2166,56 @@ export declare namespace storagetransfer_v1 {
|
|
|
1313
2166
|
list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
1314
2167
|
/**
|
|
1315
2168
|
* Pauses a transfer operation.
|
|
2169
|
+
* @example
|
|
2170
|
+
* ```js
|
|
2171
|
+
* // Before running the sample:
|
|
2172
|
+
* // - Enable the API at:
|
|
2173
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2174
|
+
* // - Login into gcloud by running:
|
|
2175
|
+
* // ```sh
|
|
2176
|
+
* // $ gcloud auth application-default login
|
|
2177
|
+
* // ```
|
|
2178
|
+
* // - Install the npm module by running:
|
|
2179
|
+
* // ```sh
|
|
2180
|
+
* // $ npm install googleapis
|
|
2181
|
+
* // ```
|
|
2182
|
+
*
|
|
2183
|
+
* const {google} = require('googleapis');
|
|
2184
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2185
|
+
*
|
|
2186
|
+
* async function main() {
|
|
2187
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2188
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2189
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2190
|
+
* });
|
|
2191
|
+
*
|
|
2192
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2193
|
+
* const authClient = await auth.getClient();
|
|
2194
|
+
* google.options({auth: authClient});
|
|
2195
|
+
*
|
|
2196
|
+
* // Do the magic
|
|
2197
|
+
* const res = await storagetransfer.transferOperations.pause({
|
|
2198
|
+
* // Required. The name of the transfer operation.
|
|
2199
|
+
* name: 'transferOperations/.*',
|
|
2200
|
+
*
|
|
2201
|
+
* // Request body metadata
|
|
2202
|
+
* requestBody: {
|
|
2203
|
+
* // request body parameters
|
|
2204
|
+
* // {}
|
|
2205
|
+
* },
|
|
2206
|
+
* });
|
|
2207
|
+
* console.log(res.data);
|
|
2208
|
+
*
|
|
2209
|
+
* // Example response
|
|
2210
|
+
* // {}
|
|
2211
|
+
* }
|
|
2212
|
+
*
|
|
2213
|
+
* main().catch(e => {
|
|
2214
|
+
* console.error(e);
|
|
2215
|
+
* throw e;
|
|
2216
|
+
* });
|
|
2217
|
+
*
|
|
2218
|
+
* ```
|
|
1316
2219
|
*
|
|
1317
2220
|
* @param params - Parameters for request
|
|
1318
2221
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1327,6 +2230,56 @@ export declare namespace storagetransfer_v1 {
|
|
|
1327
2230
|
pause(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1328
2231
|
/**
|
|
1329
2232
|
* Resumes a transfer operation that is paused.
|
|
2233
|
+
* @example
|
|
2234
|
+
* ```js
|
|
2235
|
+
* // Before running the sample:
|
|
2236
|
+
* // - Enable the API at:
|
|
2237
|
+
* // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
|
|
2238
|
+
* // - Login into gcloud by running:
|
|
2239
|
+
* // ```sh
|
|
2240
|
+
* // $ gcloud auth application-default login
|
|
2241
|
+
* // ```
|
|
2242
|
+
* // - Install the npm module by running:
|
|
2243
|
+
* // ```sh
|
|
2244
|
+
* // $ npm install googleapis
|
|
2245
|
+
* // ```
|
|
2246
|
+
*
|
|
2247
|
+
* const {google} = require('googleapis');
|
|
2248
|
+
* const storagetransfer = google.storagetransfer('v1');
|
|
2249
|
+
*
|
|
2250
|
+
* async function main() {
|
|
2251
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2252
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2253
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2254
|
+
* });
|
|
2255
|
+
*
|
|
2256
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2257
|
+
* const authClient = await auth.getClient();
|
|
2258
|
+
* google.options({auth: authClient});
|
|
2259
|
+
*
|
|
2260
|
+
* // Do the magic
|
|
2261
|
+
* const res = await storagetransfer.transferOperations.resume({
|
|
2262
|
+
* // Required. The name of the transfer operation.
|
|
2263
|
+
* name: 'transferOperations/.*',
|
|
2264
|
+
*
|
|
2265
|
+
* // Request body metadata
|
|
2266
|
+
* requestBody: {
|
|
2267
|
+
* // request body parameters
|
|
2268
|
+
* // {}
|
|
2269
|
+
* },
|
|
2270
|
+
* });
|
|
2271
|
+
* console.log(res.data);
|
|
2272
|
+
*
|
|
2273
|
+
* // Example response
|
|
2274
|
+
* // {}
|
|
2275
|
+
* }
|
|
2276
|
+
*
|
|
2277
|
+
* main().catch(e => {
|
|
2278
|
+
* console.error(e);
|
|
2279
|
+
* throw e;
|
|
2280
|
+
* });
|
|
2281
|
+
*
|
|
2282
|
+
* ```
|
|
1330
2283
|
*
|
|
1331
2284
|
* @param params - Parameters for request
|
|
1332
2285
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|