Storage Transfer Service and its protos. Transfers data between between Google Cloud Storage buckets or from a data source external to Google to a Cloud Storage bucket. v1
Package
@google-cloud/storage-transfer
Constructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of StorageTransferServiceClient.
Parameter
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
storageTransferServiceStub
storageTransferServiceStub?: Promise<{
[name: string]: Function;
}>;
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
agentPoolsPath(projectId, agentPoolId)
agentPoolsPath(projectId: string, agentPoolId: string): string;
Return a fully-qualified agentPools resource name string.
Parameters
Name | Description |
projectId |
string
|
agentPoolId |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
checkRunTransferJobProgress(name)
checkRunTransferJobProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.storagetransfer.v1.TransferOperation>>;
Check the status of the long running operation returned by runTransferJob()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.storagetransfer.v1.TransferOperation>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the transfer job.
*/
// const jobName = 'abc123'
/**
* Required. The ID of the Google Cloud project that owns the transfer
* job.
*/
// const projectId = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callRunTransferJob() {
// Construct request
const request = {
jobName,
projectId,
};
// Run request
const [operation] = await storagetransferClient.runTransferJob(request);
const [response] = await operation.promise();
console.log(response);
}
callRunTransferJob();
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed.
|
createAgentPool(request, options)
createAgentPool(request?: protos.google.storagetransfer.v1.ICreateAgentPoolRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.IAgentPool,
protos.google.storagetransfer.v1.ICreateAgentPoolRequest | undefined,
{} | undefined
]>;
Creates an agent pool resource.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.ICreateAgentPoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.IAgentPool,
protos.google.storagetransfer.v1.ICreateAgentPoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AgentPool]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The ID of the Google Cloud project that owns the
* agent pool.
*/
// const projectId = 'abc123'
/**
* Required. The agent pool to create.
*/
// const agentPool = {}
/**
* 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)?$`.
*/
// const agentPoolId = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callCreateAgentPool() {
// Construct request
const request = {
projectId,
agentPool,
agentPoolId,
};
// Run request
const response = await storagetransferClient.createAgentPool(request);
console.log(response);
}
callCreateAgentPool();
createAgentPool(request, options, callback)
createAgentPool(request: protos.google.storagetransfer.v1.ICreateAgentPoolRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.ICreateAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.ICreateAgentPoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.ICreateAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
createAgentPool(request, callback)
createAgentPool(request: protos.google.storagetransfer.v1.ICreateAgentPoolRequest, callback: Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.ICreateAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.ICreateAgentPoolRequest
|
callback |
Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.ICreateAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
createTransferJob(request, options)
createTransferJob(request?: protos.google.storagetransfer.v1.ICreateTransferJobRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.ITransferJob,
protos.google.storagetransfer.v1.ICreateTransferJobRequest | undefined,
{} | undefined
]>;
Creates a transfer job that runs periodically.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.ICreateTransferJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.ITransferJob,
protos.google.storagetransfer.v1.ICreateTransferJobRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The job to create.
*/
// const transferJob = {}
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callCreateTransferJob() {
// Construct request
const request = {
transferJob,
};
// Run request
const response = await storagetransferClient.createTransferJob(request);
console.log(response);
}
callCreateTransferJob();
createTransferJob(request, options, callback)
createTransferJob(request: protos.google.storagetransfer.v1.ICreateTransferJobRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.ICreateTransferJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.ICreateTransferJobRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.ICreateTransferJobRequest | null | undefined, {} | null | undefined>
|
Returns
createTransferJob(request, callback)
createTransferJob(request: protos.google.storagetransfer.v1.ICreateTransferJobRequest, callback: Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.ICreateTransferJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.ICreateTransferJobRequest
|
callback |
Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.ICreateTransferJobRequest | null | undefined, {} | null | undefined>
|
Returns
deleteAgentPool(request, options)
deleteAgentPool(request?: protos.google.storagetransfer.v1.IDeleteAgentPoolRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | undefined,
{} | undefined
]>;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IDeleteAgentPoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the agent pool to delete.
*/
// const name = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callDeleteAgentPool() {
// Construct request
const request = {
name,
};
// Run request
const response = await storagetransferClient.deleteAgentPool(request);
console.log(response);
}
callDeleteAgentPool();
deleteAgentPool(request, options, callback)
deleteAgentPool(request: protos.google.storagetransfer.v1.IDeleteAgentPoolRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IDeleteAgentPoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
deleteAgentPool(request, callback)
deleteAgentPool(request: protos.google.storagetransfer.v1.IDeleteAgentPoolRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IDeleteAgentPoolRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
getAgentPool(request, options)
getAgentPool(request?: protos.google.storagetransfer.v1.IGetAgentPoolRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.IAgentPool,
protos.google.storagetransfer.v1.IGetAgentPoolRequest | undefined,
{} | undefined
]>;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetAgentPoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.IAgentPool,
protos.google.storagetransfer.v1.IGetAgentPoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AgentPool]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the agent pool to get.
*/
// const name = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callGetAgentPool() {
// Construct request
const request = {
name,
};
// Run request
const response = await storagetransferClient.getAgentPool(request);
console.log(response);
}
callGetAgentPool();
getAgentPool(request, options, callback)
getAgentPool(request: protos.google.storagetransfer.v1.IGetAgentPoolRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IGetAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetAgentPoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IGetAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
getAgentPool(request, callback)
getAgentPool(request: protos.google.storagetransfer.v1.IGetAgentPoolRequest, callback: Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IGetAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetAgentPoolRequest
|
callback |
Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IGetAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
getGoogleServiceAccount(request, options)
getGoogleServiceAccount(request?: protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.IGoogleServiceAccount,
(protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | undefined),
{} | undefined
]>;
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.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.IGoogleServiceAccount,
(protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [GoogleServiceAccount]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The ID of the Google Cloud project that the Google service
* account is associated with.
*/
// const projectId = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callGetGoogleServiceAccount() {
// Construct request
const request = {
projectId,
};
// Run request
const response = await storagetransferClient.getGoogleServiceAccount(request);
console.log(response);
}
callGetGoogleServiceAccount();
getGoogleServiceAccount(request, options, callback)
getGoogleServiceAccount(request: protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.IGoogleServiceAccount, protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.IGoogleServiceAccount, protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | null | undefined, {} | null | undefined>
|
Returns
getGoogleServiceAccount(request, callback)
getGoogleServiceAccount(request: protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest, callback: Callback<protos.google.storagetransfer.v1.IGoogleServiceAccount, protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest
|
callback |
Callback<protos.google.storagetransfer.v1.IGoogleServiceAccount, protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | null | undefined, {} | null | undefined>
|
Returns
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
getTransferJob(request, options)
getTransferJob(request?: protos.google.storagetransfer.v1.IGetTransferJobRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.ITransferJob,
protos.google.storagetransfer.v1.IGetTransferJobRequest | undefined,
{} | undefined
]>;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetTransferJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.ITransferJob,
protos.google.storagetransfer.v1.IGetTransferJobRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The job to get.
*/
// const jobName = 'abc123'
/**
* Required. The ID of the Google Cloud project that owns the
* job.
*/
// const projectId = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callGetTransferJob() {
// Construct request
const request = {
jobName,
projectId,
};
// Run request
const response = await storagetransferClient.getTransferJob(request);
console.log(response);
}
callGetTransferJob();
getTransferJob(request, options, callback)
getTransferJob(request: protos.google.storagetransfer.v1.IGetTransferJobRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IGetTransferJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetTransferJobRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IGetTransferJobRequest | null | undefined, {} | null | undefined>
|
Returns
getTransferJob(request, callback)
getTransferJob(request: protos.google.storagetransfer.v1.IGetTransferJobRequest, callback: Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IGetTransferJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IGetTransferJobRequest
|
callback |
Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IGetTransferJobRequest | null | undefined, {} | null | undefined>
|
Returns
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub.
|
listAgentPools(request, options)
listAgentPools(request?: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.IAgentPool[],
protos.google.storagetransfer.v1.IListAgentPoolsRequest | null,
protos.google.storagetransfer.v1.IListAgentPoolsResponse
]>;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListAgentPoolsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.IAgentPool[],
protos.google.storagetransfer.v1.IListAgentPoolsRequest | null,
protos.google.storagetransfer.v1.IListAgentPoolsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [AgentPool]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAgentPoolsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listAgentPools(request, options, callback)
listAgentPools(request: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options: CallOptions, callback: PaginationCallback<protos.google.storagetransfer.v1.IListAgentPoolsRequest, protos.google.storagetransfer.v1.IListAgentPoolsResponse | null | undefined, protos.google.storagetransfer.v1.IAgentPool>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListAgentPoolsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.storagetransfer.v1.IListAgentPoolsRequest, protos.google.storagetransfer.v1.IListAgentPoolsResponse | null | undefined, protos.google.storagetransfer.v1.IAgentPool>
|
Returns
listAgentPools(request, callback)
listAgentPools(request: protos.google.storagetransfer.v1.IListAgentPoolsRequest, callback: PaginationCallback<protos.google.storagetransfer.v1.IListAgentPoolsRequest, protos.google.storagetransfer.v1.IListAgentPoolsResponse | null | undefined, protos.google.storagetransfer.v1.IAgentPool>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListAgentPoolsRequest
|
callback |
PaginationCallback<protos.google.storagetransfer.v1.IListAgentPoolsRequest, protos.google.storagetransfer.v1.IListAgentPoolsResponse | null | undefined, protos.google.storagetransfer.v1.IAgentPool>
|
Returns
listAgentPoolsAsync(request, options)
listAgentPoolsAsync(request?: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options?: CallOptions): AsyncIterable<protos.google.storagetransfer.v1.IAgentPool>;
Equivalent to listAgentPools
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListAgentPoolsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.storagetransfer.v1.IAgentPool> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [AgentPool]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The ID of the Google Cloud project that owns the job.
*/
// const projectId = 'abc123'
/**
* 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.
*/
// const filter = 'abc123'
/**
* The list page size. The max allowed value is `256`.
*/
// const pageSize = 1234
/**
* The list page token.
*/
// const pageToken = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callListAgentPools() {
// Construct request
const request = {
projectId,
};
// Run request
const iterable = await storagetransferClient.listAgentPoolsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAgentPools();
listAgentPoolsStream(request, options)
listAgentPoolsStream(request?: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListAgentPoolsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [AgentPool] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAgentPoolsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listTransferJobs(request, options)
listTransferJobs(request?: protos.google.storagetransfer.v1.IListTransferJobsRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.ITransferJob[],
protos.google.storagetransfer.v1.IListTransferJobsRequest | null,
protos.google.storagetransfer.v1.IListTransferJobsResponse
]>;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListTransferJobsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.ITransferJob[],
protos.google.storagetransfer.v1.IListTransferJobsRequest | null,
protos.google.storagetransfer.v1.IListTransferJobsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [TransferJob]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTransferJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listTransferJobs(request, options, callback)
listTransferJobs(request: protos.google.storagetransfer.v1.IListTransferJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.storagetransfer.v1.IListTransferJobsRequest, protos.google.storagetransfer.v1.IListTransferJobsResponse | null | undefined, protos.google.storagetransfer.v1.ITransferJob>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListTransferJobsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.storagetransfer.v1.IListTransferJobsRequest, protos.google.storagetransfer.v1.IListTransferJobsResponse | null | undefined, protos.google.storagetransfer.v1.ITransferJob>
|
Returns
listTransferJobs(request, callback)
listTransferJobs(request: protos.google.storagetransfer.v1.IListTransferJobsRequest, callback: PaginationCallback<protos.google.storagetransfer.v1.IListTransferJobsRequest, protos.google.storagetransfer.v1.IListTransferJobsResponse | null | undefined, protos.google.storagetransfer.v1.ITransferJob>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListTransferJobsRequest
|
callback |
PaginationCallback<protos.google.storagetransfer.v1.IListTransferJobsRequest, protos.google.storagetransfer.v1.IListTransferJobsResponse | null | undefined, protos.google.storagetransfer.v1.ITransferJob>
|
Returns
listTransferJobsAsync(request, options)
listTransferJobsAsync(request?: protos.google.storagetransfer.v1.IListTransferJobsRequest, options?: CallOptions): AsyncIterable<protos.google.storagetransfer.v1.ITransferJob>;
Equivalent to listTransferJobs
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListTransferJobsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.storagetransfer.v1.ITransferJob> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [TransferJob]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A list of query parameters specified as JSON text in the form of:
* `{"projectId":"my_project_id",
* "jobNames":"jobid1","jobid2",...,
* "jobStatuses":"status1","status2",... }`
* Since `jobNames` and `jobStatuses` support multiple values, their values
* must be specified with array notation. `projectId` is required.
* `jobNames` and `jobStatuses` are optional. The valid values for
* `jobStatuses` are case-insensitive:
* ENABLED google.storagetransfer.v1.TransferJob.Status.ENABLED,
* DISABLED google.storagetransfer.v1.TransferJob.Status.DISABLED, and
* DELETED google.storagetransfer.v1.TransferJob.Status.DELETED.
*/
// const filter = 'abc123'
/**
* The list page size. The max allowed value is 256.
*/
// const pageSize = 1234
/**
* The list page token.
*/
// const pageToken = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callListTransferJobs() {
// Construct request
const request = {
filter,
};
// Run request
const iterable = await storagetransferClient.listTransferJobsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListTransferJobs();
listTransferJobsStream(request, options)
listTransferJobsStream(request?: protos.google.storagetransfer.v1.IListTransferJobsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IListTransferJobsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [TransferJob] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listTransferJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
matchAgentPoolIdFromAgentPoolsName(agentPoolsName)
matchAgentPoolIdFromAgentPoolsName(agentPoolsName: string): string | number;
Parse the agent_pool_id from AgentPools resource.
Parameter
Name | Description |
agentPoolsName |
string
A fully-qualified path representing agentPools resource.
|
Returns
Type | Description |
string | number | {string} A string representing the agent_pool_id.
|
matchProjectIdFromAgentPoolsName(agentPoolsName)
matchProjectIdFromAgentPoolsName(agentPoolsName: string): string | number;
Parse the project_id from AgentPools resource.
Parameter
Name | Description |
agentPoolsName |
string
A fully-qualified path representing agentPools resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project_id.
|
pauseTransferOperation(request, options)
pauseTransferOperation(request?: protos.google.storagetransfer.v1.IPauseTransferOperationRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.storagetransfer.v1.IPauseTransferOperationRequest | undefined),
{} | undefined
]>;
Pauses a transfer operation.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IPauseTransferOperationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.storagetransfer.v1.IPauseTransferOperationRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the transfer operation.
*/
// const name = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callPauseTransferOperation() {
// Construct request
const request = {
name,
};
// Run request
const response = await storagetransferClient.pauseTransferOperation(request);
console.log(response);
}
callPauseTransferOperation();
pauseTransferOperation(request, options, callback)
pauseTransferOperation(request: protos.google.storagetransfer.v1.IPauseTransferOperationRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IPauseTransferOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IPauseTransferOperationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IPauseTransferOperationRequest | null | undefined, {} | null | undefined>
|
Returns
pauseTransferOperation(request, callback)
pauseTransferOperation(request: protos.google.storagetransfer.v1.IPauseTransferOperationRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IPauseTransferOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IPauseTransferOperationRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IPauseTransferOperationRequest | null | undefined, {} | null | undefined>
|
Returns
resumeTransferOperation(request, options)
resumeTransferOperation(request?: protos.google.storagetransfer.v1.IResumeTransferOperationRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.storagetransfer.v1.IResumeTransferOperationRequest | undefined),
{} | undefined
]>;
Resumes a transfer operation that is paused.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IResumeTransferOperationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.storagetransfer.v1.IResumeTransferOperationRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the transfer operation.
*/
// const name = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callResumeTransferOperation() {
// Construct request
const request = {
name,
};
// Run request
const response = await storagetransferClient.resumeTransferOperation(request);
console.log(response);
}
callResumeTransferOperation();
resumeTransferOperation(request, options, callback)
resumeTransferOperation(request: protos.google.storagetransfer.v1.IResumeTransferOperationRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IResumeTransferOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IResumeTransferOperationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IResumeTransferOperationRequest | null | undefined, {} | null | undefined>
|
Returns
resumeTransferOperation(request, callback)
resumeTransferOperation(request: protos.google.storagetransfer.v1.IResumeTransferOperationRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IResumeTransferOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IResumeTransferOperationRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IResumeTransferOperationRequest | null | undefined, {} | null | undefined>
|
Returns
runTransferJob(request, options)
runTransferJob(request?: protos.google.storagetransfer.v1.IRunTransferJobRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.ITransferOperation>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error will be returned.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IRunTransferJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.ITransferOperation>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the transfer job.
*/
// const jobName = 'abc123'
/**
* Required. The ID of the Google Cloud project that owns the transfer
* job.
*/
// const projectId = 'abc123'
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callRunTransferJob() {
// Construct request
const request = {
jobName,
projectId,
};
// Run request
const [operation] = await storagetransferClient.runTransferJob(request);
const [response] = await operation.promise();
console.log(response);
}
callRunTransferJob();
runTransferJob(request, options, callback)
runTransferJob(request: protos.google.storagetransfer.v1.IRunTransferJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.ITransferOperation>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IRunTransferJobRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.ITransferOperation>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
runTransferJob(request, callback)
runTransferJob(request: protos.google.storagetransfer.v1.IRunTransferJobRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.ITransferOperation>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IRunTransferJobRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.ITransferOperation>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
updateAgentPool(request, options)
updateAgentPool(request?: protos.google.storagetransfer.v1.IUpdateAgentPoolRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.IAgentPool,
protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | undefined,
{} | undefined
]>;
Updates an existing agent pool resource.
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IUpdateAgentPoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.IAgentPool,
protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AgentPool]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The agent pool to update. `agent_pool` is expected to specify following
* fields:
* * name google.storagetransfer.v1.AgentPool.name
* * display_name google.storagetransfer.v1.AgentPool.display_name
* * bandwidth_limit google.storagetransfer.v1.AgentPool.bandwidth_limit
* An `UpdateAgentPoolRequest` with any other fields is rejected
* with the error INVALID_ARGUMENT google.rpc.Code.INVALID_ARGUMENT.
*/
// const agentPool = {}
/**
* 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 google.storagetransfer.v1.AgentPool.display_name
* * bandwidth_limit google.storagetransfer.v1.AgentPool.bandwidth_limit
*/
// const updateMask = {}
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callUpdateAgentPool() {
// Construct request
const request = {
agentPool,
};
// Run request
const response = await storagetransferClient.updateAgentPool(request);
console.log(response);
}
callUpdateAgentPool();
updateAgentPool(request, options, callback)
updateAgentPool(request: protos.google.storagetransfer.v1.IUpdateAgentPoolRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IUpdateAgentPoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
updateAgentPool(request, callback)
updateAgentPool(request: protos.google.storagetransfer.v1.IUpdateAgentPoolRequest, callback: Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IUpdateAgentPoolRequest
|
callback |
Callback<protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | null | undefined, {} | null | undefined>
|
Returns
updateTransferJob(request, options)
updateTransferJob(request?: protos.google.storagetransfer.v1.IUpdateTransferJobRequest, options?: CallOptions): Promise<[
protos.google.storagetransfer.v1.ITransferJob,
protos.google.storagetransfer.v1.IUpdateTransferJobRequest | undefined,
{} | undefined
]>;
Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already.
**Note:** The job's field can be modified using this RPC (for example, to set a job's status to , , or ).
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IUpdateTransferJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.storagetransfer.v1.ITransferJob,
protos.google.storagetransfer.v1.IUpdateTransferJobRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of job to update.
*/
// const jobName = 'abc123'
/**
* Required. The ID of the Google Cloud project that owns the
* job.
*/
// const projectId = 'abc123'
/**
* Required. The job to update. `transferJob` is expected to specify one or more of
* five fields: description google.storagetransfer.v1.TransferJob.description,
* transfer_spec google.storagetransfer.v1.TransferJob.transfer_spec,
* notification_config google.storagetransfer.v1.TransferJob.notification_config,
* logging_config google.storagetransfer.v1.TransferJob.logging_config, and
* status google.storagetransfer.v1.TransferJob.status. An `UpdateTransferJobRequest` that specifies
* other fields are rejected with the error
* INVALID_ARGUMENT google.rpc.Code.INVALID_ARGUMENT. Updating a job status
* to DELETED google.storagetransfer.v1.TransferJob.Status.DELETED requires
* `storagetransfer.jobs.delete` permissions.
*/
// const transferJob = {}
/**
* The field mask of the fields in `transferJob` that are to be updated in
* this request. Fields in `transferJob` that can be updated are:
* description google.storagetransfer.v1.TransferJob.description,
* transfer_spec google.storagetransfer.v1.TransferJob.transfer_spec,
* notification_config google.storagetransfer.v1.TransferJob.notification_config,
* logging_config google.storagetransfer.v1.TransferJob.logging_config, and
* status google.storagetransfer.v1.TransferJob.status. To update the `transfer_spec` of the job, a
* complete transfer specification must be provided. An incomplete
* specification missing any required fields is rejected with the error
* INVALID_ARGUMENT google.rpc.Code.INVALID_ARGUMENT.
*/
// const updateTransferJobFieldMask = {}
// Imports the Storagetransfer library
const {StorageTransferServiceClient} = require('@google-cloud/storage-transfer').v1;
// Instantiates a client
const storagetransferClient = new StorageTransferServiceClient();
async function callUpdateTransferJob() {
// Construct request
const request = {
jobName,
projectId,
transferJob,
};
// Run request
const response = await storagetransferClient.updateTransferJob(request);
console.log(response);
}
callUpdateTransferJob();
updateTransferJob(request, options, callback)
updateTransferJob(request: protos.google.storagetransfer.v1.IUpdateTransferJobRequest, options: CallOptions, callback: Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IUpdateTransferJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IUpdateTransferJobRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IUpdateTransferJobRequest | null | undefined, {} | null | undefined>
|
Returns
updateTransferJob(request, callback)
updateTransferJob(request: protos.google.storagetransfer.v1.IUpdateTransferJobRequest, callback: Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IUpdateTransferJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.storagetransfer.v1.IUpdateTransferJobRequest
|
callback |
Callback<protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IUpdateTransferJobRequest | null | undefined, {} | null | undefined>
|
Returns