@googleapis/storagetransfer 7.2.2 → 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 +54 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +996 -39
- package/build/v1.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +1056 -60
package/build/v1.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient,
|
|
2
|
+
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
export declare namespace storagetransfer_v1 {
|
|
5
5
|
export interface Options extends GlobalOptions {
|
|
@@ -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
|
*/
|
|
@@ -327,7 +344,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
327
344
|
*/
|
|
328
345
|
export interface Schema$HttpData {
|
|
329
346
|
/**
|
|
330
|
-
* Required. The URL that points to the file that stores the object list entries. This file must allow public access.
|
|
347
|
+
* Required. The URL that points to the file that stores the object list entries. This file must allow public access. The URL is either an HTTP/HTTPS address (e.g. `https://example.com/urllist.tsv`) or a Cloud Storage path (e.g. `gs://my-bucket/urllist.tsv`).
|
|
331
348
|
*/
|
|
332
349
|
listUrl?: string | null;
|
|
333
350
|
}
|
|
@@ -446,7 +463,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
446
463
|
pubsubTopic?: string | null;
|
|
447
464
|
}
|
|
448
465
|
/**
|
|
449
|
-
* Conditions that determine which objects are transferred. Applies only to Cloud Data Sources such as S3, Azure, and Cloud Storage. The "last modification time" refers to the time of the last change to the object's content or metadata — specifically, this is the `updated` property of Cloud Storage objects, the `LastModified` field of S3 objects, and the `Last-Modified` header of Azure blobs. Transfers with a PosixFilesystem source or destination don't support `ObjectConditions`.
|
|
466
|
+
* Conditions that determine which objects are transferred. Applies only to Cloud Data Sources such as S3, Azure, and Cloud Storage. The "last modification time" refers to the time of the last change to the object's content or metadata — specifically, this is the `updated` property of Cloud Storage objects, the `LastModified` field of S3 objects, and the `Last-Modified` header of Azure blobs. For S3 objects, the `LastModified` value is the time the object begins uploading. If the object meets your "last modification time" criteria, but has not finished uploading, the object is not transferred. See [Transfer from Amazon S3 to Cloud Storage](https://cloud.google.com/storage-transfer/docs/create-transfers/agentless/s3#transfer_options) for more information. Transfers with a PosixFilesystem source or destination don't support `ObjectConditions`.
|
|
450
467
|
*/
|
|
451
468
|
export interface Schema$ObjectConditions {
|
|
452
469
|
/**
|
|
@@ -578,7 +595,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
578
595
|
*/
|
|
579
596
|
export interface Schema$Schedule {
|
|
580
597
|
/**
|
|
581
|
-
* The time in UTC that no further transfer operations are scheduled. Combined with schedule_end_date, `end_time_of_day` specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the
|
|
598
|
+
* The time in UTC that no further transfer operations are scheduled. Combined with schedule_end_date, `end_time_of_day` specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the combination of schedule_start_date and start_time_of_day, and is subject to the following: * If `end_time_of_day` is not set and `schedule_end_date` is set, then a default value of `23:59:59` is used for `end_time_of_day`. * If `end_time_of_day` is set and `schedule_end_date` is not set, then INVALID_ARGUMENT is returned.
|
|
582
599
|
*/
|
|
583
600
|
endTimeOfDay?: Schema$TimeOfDay;
|
|
584
601
|
/**
|
|
@@ -779,6 +796,10 @@ export declare namespace storagetransfer_v1 {
|
|
|
779
796
|
* Specifies schedule for the transfer job. This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule.
|
|
780
797
|
*/
|
|
781
798
|
schedule?: Schema$Schedule;
|
|
799
|
+
/**
|
|
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.
|
|
801
|
+
*/
|
|
802
|
+
serviceAccount?: string | null;
|
|
782
803
|
/**
|
|
783
804
|
* Status of the job. This value MUST be specified for `CreateTransferJobRequests`. **Note:** The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.
|
|
784
805
|
*/
|
|
@@ -863,7 +884,7 @@ export declare namespace storagetransfer_v1 {
|
|
|
863
884
|
*/
|
|
864
885
|
metadataOptions?: Schema$MetadataOptions;
|
|
865
886
|
/**
|
|
866
|
-
* When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are
|
|
887
|
+
* When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are overwritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.
|
|
867
888
|
*/
|
|
868
889
|
overwriteObjectsAlreadyExistingInSink?: boolean | null;
|
|
869
890
|
/**
|
|
@@ -958,14 +979,61 @@ export declare namespace storagetransfer_v1 {
|
|
|
958
979
|
constructor(context: APIRequestContext);
|
|
959
980
|
/**
|
|
960
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
|
+
* ```
|
|
961
1029
|
*
|
|
962
1030
|
* @param params - Parameters for request
|
|
963
1031
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
964
1032
|
* @param callback - Optional callback that handles the response.
|
|
965
1033
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
966
1034
|
*/
|
|
967
|
-
get(params: Params$Resource$Googleserviceaccounts$Get, options: StreamMethodOptions):
|
|
968
|
-
get(params?: Params$Resource$Googleserviceaccounts$Get, options?: MethodOptions):
|
|
1035
|
+
get(params: Params$Resource$Googleserviceaccounts$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1036
|
+
get(params?: Params$Resource$Googleserviceaccounts$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleServiceAccount>>;
|
|
969
1037
|
get(params: Params$Resource$Googleserviceaccounts$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
970
1038
|
get(params: Params$Resource$Googleserviceaccounts$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleServiceAccount>, callback: BodyResponseCallback<Schema$GoogleServiceAccount>): void;
|
|
971
1039
|
get(params: Params$Resource$Googleserviceaccounts$Get, callback: BodyResponseCallback<Schema$GoogleServiceAccount>): void;
|
|
@@ -987,70 +1055,340 @@ export declare namespace storagetransfer_v1 {
|
|
|
987
1055
|
constructor(context: APIRequestContext);
|
|
988
1056
|
/**
|
|
989
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
|
+
* ```
|
|
990
1120
|
*
|
|
991
1121
|
* @param params - Parameters for request
|
|
992
1122
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
993
1123
|
* @param callback - Optional callback that handles the response.
|
|
994
1124
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
995
1125
|
*/
|
|
996
|
-
create(params: Params$Resource$Projects$Agentpools$Create, options: StreamMethodOptions):
|
|
997
|
-
create(params?: Params$Resource$Projects$Agentpools$Create, options?: MethodOptions):
|
|
1126
|
+
create(params: Params$Resource$Projects$Agentpools$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1127
|
+
create(params?: Params$Resource$Projects$Agentpools$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>;
|
|
998
1128
|
create(params: Params$Resource$Projects$Agentpools$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
999
1129
|
create(params: Params$Resource$Projects$Agentpools$Create, options: MethodOptions | BodyResponseCallback<Schema$AgentPool>, callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1000
1130
|
create(params: Params$Resource$Projects$Agentpools$Create, callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1001
1131
|
create(callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1002
1132
|
/**
|
|
1003
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
|
+
* ```
|
|
1004
1178
|
*
|
|
1005
1179
|
* @param params - Parameters for request
|
|
1006
1180
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1007
1181
|
* @param callback - Optional callback that handles the response.
|
|
1008
1182
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1009
1183
|
*/
|
|
1010
|
-
delete(params: Params$Resource$Projects$Agentpools$Delete, options: StreamMethodOptions):
|
|
1011
|
-
delete(params?: Params$Resource$Projects$Agentpools$Delete, options?: MethodOptions):
|
|
1184
|
+
delete(params: Params$Resource$Projects$Agentpools$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1185
|
+
delete(params?: Params$Resource$Projects$Agentpools$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1012
1186
|
delete(params: Params$Resource$Projects$Agentpools$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1013
1187
|
delete(params: Params$Resource$Projects$Agentpools$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1014
1188
|
delete(params: Params$Resource$Projects$Agentpools$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1015
1189
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1016
1190
|
/**
|
|
1017
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
|
+
* ```
|
|
1018
1241
|
*
|
|
1019
1242
|
* @param params - Parameters for request
|
|
1020
1243
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1021
1244
|
* @param callback - Optional callback that handles the response.
|
|
1022
1245
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1023
1246
|
*/
|
|
1024
|
-
get(params: Params$Resource$Projects$Agentpools$Get, options: StreamMethodOptions):
|
|
1025
|
-
get(params?: Params$Resource$Projects$Agentpools$Get, options?: MethodOptions):
|
|
1247
|
+
get(params: Params$Resource$Projects$Agentpools$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1248
|
+
get(params?: Params$Resource$Projects$Agentpools$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>;
|
|
1026
1249
|
get(params: Params$Resource$Projects$Agentpools$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1027
1250
|
get(params: Params$Resource$Projects$Agentpools$Get, options: MethodOptions | BodyResponseCallback<Schema$AgentPool>, callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1028
1251
|
get(params: Params$Resource$Projects$Agentpools$Get, callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1029
1252
|
get(callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1030
1253
|
/**
|
|
1031
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
|
+
* ```
|
|
1032
1308
|
*
|
|
1033
1309
|
* @param params - Parameters for request
|
|
1034
1310
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1035
1311
|
* @param callback - Optional callback that handles the response.
|
|
1036
1312
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1037
1313
|
*/
|
|
1038
|
-
list(params: Params$Resource$Projects$Agentpools$List, options: StreamMethodOptions):
|
|
1039
|
-
list(params?: Params$Resource$Projects$Agentpools$List, options?: MethodOptions):
|
|
1314
|
+
list(params: Params$Resource$Projects$Agentpools$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1315
|
+
list(params?: Params$Resource$Projects$Agentpools$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAgentPoolsResponse>>;
|
|
1040
1316
|
list(params: Params$Resource$Projects$Agentpools$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1041
1317
|
list(params: Params$Resource$Projects$Agentpools$List, options: MethodOptions | BodyResponseCallback<Schema$ListAgentPoolsResponse>, callback: BodyResponseCallback<Schema$ListAgentPoolsResponse>): void;
|
|
1042
1318
|
list(params: Params$Resource$Projects$Agentpools$List, callback: BodyResponseCallback<Schema$ListAgentPoolsResponse>): void;
|
|
1043
1319
|
list(callback: BodyResponseCallback<Schema$ListAgentPoolsResponse>): void;
|
|
1044
1320
|
/**
|
|
1045
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
|
+
* ```
|
|
1046
1384
|
*
|
|
1047
1385
|
* @param params - Parameters for request
|
|
1048
1386
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1049
1387
|
* @param callback - Optional callback that handles the response.
|
|
1050
1388
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1051
1389
|
*/
|
|
1052
|
-
patch(params: Params$Resource$Projects$Agentpools$Patch, options: StreamMethodOptions):
|
|
1053
|
-
patch(params?: Params$Resource$Projects$Agentpools$Patch, options?: MethodOptions):
|
|
1390
|
+
patch(params: Params$Resource$Projects$Agentpools$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1391
|
+
patch(params?: Params$Resource$Projects$Agentpools$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>;
|
|
1054
1392
|
patch(params: Params$Resource$Projects$Agentpools$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1055
1393
|
patch(params: Params$Resource$Projects$Agentpools$Patch, options: MethodOptions | BodyResponseCallback<Schema$AgentPool>, callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
1056
1394
|
patch(params: Params$Resource$Projects$Agentpools$Patch, callback: BodyResponseCallback<Schema$AgentPool>): void;
|
|
@@ -1119,84 +1457,450 @@ export declare namespace storagetransfer_v1 {
|
|
|
1119
1457
|
constructor(context: APIRequestContext);
|
|
1120
1458
|
/**
|
|
1121
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
|
+
* ```
|
|
1122
1539
|
*
|
|
1123
1540
|
* @param params - Parameters for request
|
|
1124
1541
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1125
1542
|
* @param callback - Optional callback that handles the response.
|
|
1126
1543
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1127
1544
|
*/
|
|
1128
|
-
create(params: Params$Resource$Transferjobs$Create, options: StreamMethodOptions):
|
|
1129
|
-
create(params?: Params$Resource$Transferjobs$Create, options?: MethodOptions):
|
|
1545
|
+
create(params: Params$Resource$Transferjobs$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1546
|
+
create(params?: Params$Resource$Transferjobs$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>;
|
|
1130
1547
|
create(params: Params$Resource$Transferjobs$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1131
1548
|
create(params: Params$Resource$Transferjobs$Create, options: MethodOptions | BodyResponseCallback<Schema$TransferJob>, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1132
1549
|
create(params: Params$Resource$Transferjobs$Create, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1133
1550
|
create(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1134
1551
|
/**
|
|
1135
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
|
+
* ```
|
|
1136
1599
|
*
|
|
1137
1600
|
* @param params - Parameters for request
|
|
1138
1601
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1139
1602
|
* @param callback - Optional callback that handles the response.
|
|
1140
1603
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1141
1604
|
*/
|
|
1142
|
-
delete(params: Params$Resource$Transferjobs$Delete, options: StreamMethodOptions):
|
|
1143
|
-
delete(params?: Params$Resource$Transferjobs$Delete, options?: MethodOptions):
|
|
1605
|
+
delete(params: Params$Resource$Transferjobs$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1606
|
+
delete(params?: Params$Resource$Transferjobs$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1144
1607
|
delete(params: Params$Resource$Transferjobs$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1145
1608
|
delete(params: Params$Resource$Transferjobs$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1146
1609
|
delete(params: Params$Resource$Transferjobs$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1147
1610
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1148
1611
|
/**
|
|
1149
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
|
+
* ```
|
|
1150
1675
|
*
|
|
1151
1676
|
* @param params - Parameters for request
|
|
1152
1677
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1153
1678
|
* @param callback - Optional callback that handles the response.
|
|
1154
1679
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1155
1680
|
*/
|
|
1156
|
-
get(params: Params$Resource$Transferjobs$Get, options: StreamMethodOptions):
|
|
1157
|
-
get(params?: Params$Resource$Transferjobs$Get, options?: MethodOptions):
|
|
1681
|
+
get(params: Params$Resource$Transferjobs$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1682
|
+
get(params?: Params$Resource$Transferjobs$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>;
|
|
1158
1683
|
get(params: Params$Resource$Transferjobs$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1159
1684
|
get(params: Params$Resource$Transferjobs$Get, options: MethodOptions | BodyResponseCallback<Schema$TransferJob>, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1160
1685
|
get(params: Params$Resource$Transferjobs$Get, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1161
1686
|
get(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1162
1687
|
/**
|
|
1163
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
|
+
* ```
|
|
1164
1740
|
*
|
|
1165
1741
|
* @param params - Parameters for request
|
|
1166
1742
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1167
1743
|
* @param callback - Optional callback that handles the response.
|
|
1168
1744
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1169
1745
|
*/
|
|
1170
|
-
list(params: Params$Resource$Transferjobs$List, options: StreamMethodOptions):
|
|
1171
|
-
list(params?: Params$Resource$Transferjobs$List, options?: MethodOptions):
|
|
1746
|
+
list(params: Params$Resource$Transferjobs$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1747
|
+
list(params?: Params$Resource$Transferjobs$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListTransferJobsResponse>>;
|
|
1172
1748
|
list(params: Params$Resource$Transferjobs$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1173
1749
|
list(params: Params$Resource$Transferjobs$List, options: MethodOptions | BodyResponseCallback<Schema$ListTransferJobsResponse>, callback: BodyResponseCallback<Schema$ListTransferJobsResponse>): void;
|
|
1174
1750
|
list(params: Params$Resource$Transferjobs$List, callback: BodyResponseCallback<Schema$ListTransferJobsResponse>): void;
|
|
1175
1751
|
list(callback: BodyResponseCallback<Schema$ListTransferJobsResponse>): void;
|
|
1176
1752
|
/**
|
|
1177
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
|
+
* ```
|
|
1178
1824
|
*
|
|
1179
1825
|
* @param params - Parameters for request
|
|
1180
1826
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1181
1827
|
* @param callback - Optional callback that handles the response.
|
|
1182
1828
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1183
1829
|
*/
|
|
1184
|
-
patch(params: Params$Resource$Transferjobs$Patch, options: StreamMethodOptions):
|
|
1185
|
-
patch(params?: Params$Resource$Transferjobs$Patch, options?: MethodOptions):
|
|
1830
|
+
patch(params: Params$Resource$Transferjobs$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1831
|
+
patch(params?: Params$Resource$Transferjobs$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>;
|
|
1186
1832
|
patch(params: Params$Resource$Transferjobs$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1187
1833
|
patch(params: Params$Resource$Transferjobs$Patch, options: MethodOptions | BodyResponseCallback<Schema$TransferJob>, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1188
1834
|
patch(params: Params$Resource$Transferjobs$Patch, callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1189
1835
|
patch(callback: BodyResponseCallback<Schema$TransferJob>): void;
|
|
1190
1836
|
/**
|
|
1191
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
|
+
* ```
|
|
1192
1896
|
*
|
|
1193
1897
|
* @param params - Parameters for request
|
|
1194
1898
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1195
1899
|
* @param callback - Optional callback that handles the response.
|
|
1196
1900
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1197
1901
|
*/
|
|
1198
|
-
run(params: Params$Resource$Transferjobs$Run, options: StreamMethodOptions):
|
|
1199
|
-
run(params?: Params$Resource$Transferjobs$Run, options?: MethodOptions):
|
|
1902
|
+
run(params: Params$Resource$Transferjobs$Run, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1903
|
+
run(params?: Params$Resource$Transferjobs$Run, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1200
1904
|
run(params: Params$Resource$Transferjobs$Run, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1201
1905
|
run(params: Params$Resource$Transferjobs$Run, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1202
1906
|
run(params: Params$Resource$Transferjobs$Run, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
@@ -1267,70 +1971,323 @@ export declare namespace storagetransfer_v1 {
|
|
|
1267
1971
|
constructor(context: APIRequestContext);
|
|
1268
1972
|
/**
|
|
1269
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
|
+
* ```
|
|
1270
2024
|
*
|
|
1271
2025
|
* @param params - Parameters for request
|
|
1272
2026
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1273
2027
|
* @param callback - Optional callback that handles the response.
|
|
1274
2028
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1275
2029
|
*/
|
|
1276
|
-
cancel(params: Params$Resource$Transferoperations$Cancel, options: StreamMethodOptions):
|
|
1277
|
-
cancel(params?: Params$Resource$Transferoperations$Cancel, options?: MethodOptions):
|
|
2030
|
+
cancel(params: Params$Resource$Transferoperations$Cancel, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2031
|
+
cancel(params?: Params$Resource$Transferoperations$Cancel, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1278
2032
|
cancel(params: Params$Resource$Transferoperations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1279
2033
|
cancel(params: Params$Resource$Transferoperations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1280
2034
|
cancel(params: Params$Resource$Transferoperations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1281
2035
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1282
2036
|
/**
|
|
1283
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
|
+
* ```
|
|
1284
2088
|
*
|
|
1285
2089
|
* @param params - Parameters for request
|
|
1286
2090
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1287
2091
|
* @param callback - Optional callback that handles the response.
|
|
1288
2092
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1289
2093
|
*/
|
|
1290
|
-
get(params: Params$Resource$Transferoperations$Get, options: StreamMethodOptions):
|
|
1291
|
-
get(params?: Params$Resource$Transferoperations$Get, options?: MethodOptions):
|
|
2094
|
+
get(params: Params$Resource$Transferoperations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2095
|
+
get(params?: Params$Resource$Transferoperations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1292
2096
|
get(params: Params$Resource$Transferoperations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1293
2097
|
get(params: Params$Resource$Transferoperations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1294
2098
|
get(params: Params$Resource$Transferoperations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1295
2099
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1296
2100
|
/**
|
|
1297
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
|
+
* ```
|
|
1298
2155
|
*
|
|
1299
2156
|
* @param params - Parameters for request
|
|
1300
2157
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1301
2158
|
* @param callback - Optional callback that handles the response.
|
|
1302
2159
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1303
2160
|
*/
|
|
1304
|
-
list(params: Params$Resource$Transferoperations$List, options: StreamMethodOptions):
|
|
1305
|
-
list(params?: Params$Resource$Transferoperations$List, options?: MethodOptions):
|
|
2161
|
+
list(params: Params$Resource$Transferoperations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2162
|
+
list(params?: Params$Resource$Transferoperations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
|
|
1306
2163
|
list(params: Params$Resource$Transferoperations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1307
2164
|
list(params: Params$Resource$Transferoperations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
1308
2165
|
list(params: Params$Resource$Transferoperations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
1309
2166
|
list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
1310
2167
|
/**
|
|
1311
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
|
+
* ```
|
|
1312
2219
|
*
|
|
1313
2220
|
* @param params - Parameters for request
|
|
1314
2221
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1315
2222
|
* @param callback - Optional callback that handles the response.
|
|
1316
2223
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1317
2224
|
*/
|
|
1318
|
-
pause(params: Params$Resource$Transferoperations$Pause, options: StreamMethodOptions):
|
|
1319
|
-
pause(params?: Params$Resource$Transferoperations$Pause, options?: MethodOptions):
|
|
2225
|
+
pause(params: Params$Resource$Transferoperations$Pause, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2226
|
+
pause(params?: Params$Resource$Transferoperations$Pause, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1320
2227
|
pause(params: Params$Resource$Transferoperations$Pause, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1321
2228
|
pause(params: Params$Resource$Transferoperations$Pause, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1322
2229
|
pause(params: Params$Resource$Transferoperations$Pause, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1323
2230
|
pause(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1324
2231
|
/**
|
|
1325
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
|
+
* ```
|
|
1326
2283
|
*
|
|
1327
2284
|
* @param params - Parameters for request
|
|
1328
2285
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
1329
2286
|
* @param callback - Optional callback that handles the response.
|
|
1330
2287
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1331
2288
|
*/
|
|
1332
|
-
resume(params: Params$Resource$Transferoperations$Resume, options: StreamMethodOptions):
|
|
1333
|
-
resume(params?: Params$Resource$Transferoperations$Resume, options?: MethodOptions):
|
|
2289
|
+
resume(params: Params$Resource$Transferoperations$Resume, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2290
|
+
resume(params?: Params$Resource$Transferoperations$Resume, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1334
2291
|
resume(params: Params$Resource$Transferoperations$Resume, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1335
2292
|
resume(params: Params$Resource$Transferoperations$Resume, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1336
2293
|
resume(params: Params$Resource$Transferoperations$Resume, callback: BodyResponseCallback<Schema$Empty>): void;
|