Service to handle EDW migrations. v2
Package
@google-cloud/bigquery-migrationConstructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of MigrationServiceClient.
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
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
migrationServiceStub
migrationServiceStub?: Promise<{
[name: string]: Function;
}>;
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.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createMigrationWorkflow(request, options)
createMigrationWorkflow(request?: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow,
(protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest | undefined),
{} | undefined
]>;
Creates a migration workflow.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, (protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest | undefined), {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [MigrationWorkflow]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to which this migration workflow belongs.
* Example: `projects/foo/locations/bar`
*/
// const parent = 'abc123'
/**
* Required. The migration workflow to create.
*/
// const migrationWorkflow = {}
// Imports the Migration library
const {MigrationServiceClient} = require('@google-cloud/migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callCreateMigrationWorkflow() {
// Construct request
const request = {
parent,
migrationWorkflow,
};
// Run request
const response = await migrationClient.createMigrationWorkflow(request);
console.log(response);
}
callCreateMigrationWorkflow();
createMigrationWorkflow(request, options, callback)
createMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createMigrationWorkflow(request, callback)
createMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, callback: Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest
|
callback |
Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteMigrationWorkflow(request, options)
deleteMigrationWorkflow(request?: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest | undefined),
{} | undefined
]>;
Deletes a migration workflow by name.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest | 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. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The unique identifier for the migration workflow.
* Example: `projects/123/locations/us/workflows/1234`
*/
// const name = 'abc123'
// Imports the Migration library
const {MigrationServiceClient} = require('@google-cloud/migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callDeleteMigrationWorkflow() {
// Construct request
const request = {
name,
};
// Run request
const response = await migrationClient.deleteMigrationWorkflow(request);
console.log(response);
}
callDeleteMigrationWorkflow();
deleteMigrationWorkflow(request, options, callback)
deleteMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteMigrationWorkflow(request, callback)
deleteMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getMigrationSubtask(request, options)
getMigrationSubtask(request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.migration.v2.IMigrationSubtask,
(protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest | undefined),
{} | undefined
]>;
Gets a previously created migration subtask.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, (protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest | undefined), {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [MigrationSubtask]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The unique identifier for the migration subtask.
* Example: `projects/123/locations/us/workflows/1234/subtasks/543`
*/
// const name = 'abc123'
/**
* Optional. The list of fields to be retrieved.
*/
// const readMask = {}
// Imports the Migration library
const {MigrationServiceClient} = require('@google-cloud/migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callGetMigrationSubtask() {
// Construct request
const request = {
name,
};
// Run request
const response = await migrationClient.getMigrationSubtask(request);
console.log(response);
}
callGetMigrationSubtask();
getMigrationSubtask(request, options, callback)
getMigrationSubtask(request: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getMigrationSubtask(request, callback)
getMigrationSubtask(request: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, callback: Callback<protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest
|
callback |
Callback<protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getMigrationWorkflow(request, options)
getMigrationWorkflow(request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow,
(protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest | undefined),
{} | undefined
]>;
Gets a previously created migration workflow.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, (protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest | undefined), {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [MigrationWorkflow]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The unique identifier for the migration workflow.
* Example: `projects/123/locations/us/workflows/1234`
*/
// const name = 'abc123'
/**
* The list of fields to be retrieved.
*/
// const readMask = {}
// Imports the Migration library
const {MigrationServiceClient} = require('@google-cloud/migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callGetMigrationWorkflow() {
// Construct request
const request = {
name,
};
// Run request
const response = await migrationClient.getMigrationWorkflow(request);
console.log(response);
}
callGetMigrationWorkflow();
getMigrationWorkflow(request, options, callback)
getMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getMigrationWorkflow(request, callback)
getMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, callback: Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest
|
callback |
Callback<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Type | Description |
void |
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.
Type | Description |
Promise<{ [name: string]: Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
listMigrationSubtasks(request, options)
listMigrationSubtasks(request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[],
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null,
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse
]>;
Lists previously created migration subtasks.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [MigrationSubtask]. 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 |
listMigrationSubtasks(request, options, callback)
listMigrationSubtasks(request: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationSubtask>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationSubtask>
|
Type | Description |
void |
listMigrationSubtasks(request, callback)
listMigrationSubtasks(request: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, callback: PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationSubtask>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest
|
callback |
PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationSubtask>
|
Type | Description |
void |
listMigrationSubtasksAsync(request, options)
listMigrationSubtasksAsync(request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.migration.v2.IMigrationSubtask>;
Equivalent to listMigrationSubtasks
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.bigquery.migration.v2.IMigrationSubtask> | {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 [MigrationSubtask]. 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. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The migration task of the subtasks to list.
* Example: `projects/123/locations/us/workflows/1234`
*/
// const parent = 'abc123'
/**
* Optional. The list of fields to be retrieved.
*/
// const readMask = {}
/**
* Optional. The maximum number of migration tasks to return. The service may return
* fewer than this number.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from previous `ListMigrationSubtasks` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListMigrationSubtasks`
* must match the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. The filter to apply. This can be used to get the subtasks of a specific
* tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the
* task ID (not the name in the named map).
*/
// const filter = 'abc123'
// Imports the Migration library
const {MigrationServiceClient} = require('@google-cloud/migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callListMigrationSubtasks() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await migrationClient.listMigrationSubtasksAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListMigrationSubtasks();
listMigrationSubtasksStream(request, options)
listMigrationSubtasksStream(request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [MigrationSubtask] 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 |
listMigrationWorkflows(request, options)
listMigrationWorkflows(request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[],
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null,
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse
]>;
Lists previously created migration workflow.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [MigrationWorkflow]. 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 |
listMigrationWorkflows(request, options, callback)
listMigrationWorkflows(request: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow>
|
Type | Description |
void |
listMigrationWorkflows(request, callback)
listMigrationWorkflows(request: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest
|
callback |
PaginationCallback<protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse | null | undefined, protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow>
|
Type | Description |
void |
listMigrationWorkflowsAsync(request, options)
listMigrationWorkflowsAsync(request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow>;
Equivalent to listMigrationWorkflows
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow> | {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 [MigrationWorkflow]. 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. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location of the migration workflows to list.
* Example: `projects/123/locations/us`
*/
// const parent = 'abc123'
/**
* The list of fields to be retrieved.
*/
// const readMask = {}
/**
* The maximum number of migration workflows to return. The service may return
* fewer than this number.
*/
// const pageSize = 1234
/**
* A page token, received from previous `ListMigrationWorkflows` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListMigrationWorkflows`
* must match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Migration library
const {MigrationServiceClient} =
require('@google-cloud/bigquery-migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callListMigrationWorkflows() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await migrationClient.listMigrationWorkflowsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListMigrationWorkflows();
listMigrationWorkflowsStream(request, options)
listMigrationWorkflowsStream(request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [MigrationWorkflow] 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 |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Name | Description |
project |
string
|
location |
string
|
Type | Description |
string | {string} Resource name string. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromMigrationSubtaskName(migrationSubtaskName)
matchLocationFromMigrationSubtaskName(migrationSubtaskName: string): string | number;
Parse the location from MigrationSubtask resource.
Name | Description |
migrationSubtaskName |
string
A fully-qualified path representing MigrationSubtask resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromMigrationWorkflowName(migrationWorkflowName)
matchLocationFromMigrationWorkflowName(migrationWorkflowName: string): string | number;
Parse the location from MigrationWorkflow resource.
Name | Description |
migrationWorkflowName |
string
A fully-qualified path representing MigrationWorkflow resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromMigrationSubtaskName(migrationSubtaskName)
matchProjectFromMigrationSubtaskName(migrationSubtaskName: string): string | number;
Parse the project from MigrationSubtask resource.
Name | Description |
migrationSubtaskName |
string
A fully-qualified path representing MigrationSubtask resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromMigrationWorkflowName(migrationWorkflowName)
matchProjectFromMigrationWorkflowName(migrationWorkflowName: string): string | number;
Parse the project from MigrationWorkflow resource.
Name | Description |
migrationWorkflowName |
string
A fully-qualified path representing MigrationWorkflow resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchSubtaskFromMigrationSubtaskName(migrationSubtaskName)
matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string): string | number;
Parse the subtask from MigrationSubtask resource.
Name | Description |
migrationSubtaskName |
string
A fully-qualified path representing MigrationSubtask resource. |
Type | Description |
string | number | {string} A string representing the subtask. |
matchWorkflowFromMigrationSubtaskName(migrationSubtaskName)
matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string): string | number;
Parse the workflow from MigrationSubtask resource.
Name | Description |
migrationSubtaskName |
string
A fully-qualified path representing MigrationSubtask resource. |
Type | Description |
string | number | {string} A string representing the workflow. |
matchWorkflowFromMigrationWorkflowName(migrationWorkflowName)
matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string): string | number;
Parse the workflow from MigrationWorkflow resource.
Name | Description |
migrationWorkflowName |
string
A fully-qualified path representing MigrationWorkflow resource. |
Type | Description |
string | number | {string} A string representing the workflow. |
migrationSubtaskPath(project, location, workflow, subtask)
migrationSubtaskPath(project: string, location: string, workflow: string, subtask: string): string;
Return a fully-qualified migrationSubtask resource name string.
Name | Description |
project |
string
|
location |
string
|
workflow |
string
|
subtask |
string
|
Type | Description |
string | {string} Resource name string. |
migrationWorkflowPath(project, location, workflow)
migrationWorkflowPath(project: string, location: string, workflow: string): string;
Return a fully-qualified migrationWorkflow resource name string.
Name | Description |
project |
string
|
location |
string
|
workflow |
string
|
Type | Description |
string | {string} Resource name string. |
startMigrationWorkflow(request, options)
startMigrationWorkflow(request?: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest | undefined),
{} | undefined
]>;
Starts a previously created migration workflow. I.e., the state transitions from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. An error will be signaled if the state is anything other than DRAFT or RUNNING.
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest | 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. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The unique identifier for the migration workflow.
* Example: `projects/123/locations/us/workflows/1234`
*/
// const name = 'abc123'
// Imports the Migration library
const {MigrationServiceClient} = require('@google-cloud/migration').v2;
// Instantiates a client
const migrationClient = new MigrationServiceClient();
async function callStartMigrationWorkflow() {
// Construct request
const request = {
name,
};
// Run request
const response = await migrationClient.startMigrationWorkflow(request);
console.log(response);
}
callStartMigrationWorkflow();
startMigrationWorkflow(request, options, callback)
startMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
startMigrationWorkflow(request, callback)
startMigrationWorkflow(request: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |