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