The Dataflow Messages API is used for monitoring the progress of Dataflow jobs. v1beta3
Package
@google-cloud/dataflowConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of MessagesV1Beta3Client.
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
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;
};
messagesV1Beta3Stub
messagesV1Beta3Stub?: Promise<{
[name: string]: Function;
}>;
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. |
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. |
listJobMessages(request, options)
listJobMessages(request?: protos.google.dataflow.v1beta3.IListJobMessagesRequest, options?: CallOptions): Promise<[
protos.google.dataflow.v1beta3.IJobMessage[],
protos.google.dataflow.v1beta3.IListJobMessagesRequest | null,
protos.google.dataflow.v1beta3.IListJobMessagesResponse
]>;
Request the job status.
To request the status of a job, we recommend using projects.locations.jobs.messages.list
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.messages.list
is not recommended, as you can only request the status of jobs that are running in us-central1
.
Name | Description |
request |
protos.google.dataflow.v1beta3.IListJobMessagesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.dataflow.v1beta3.IJobMessage[], protos.google.dataflow.v1beta3.IListJobMessagesRequest | null, protos.google.dataflow.v1beta3.IListJobMessagesResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [JobMessage]. 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 |
listJobMessages(request, options, callback)
listJobMessages(request: protos.google.dataflow.v1beta3.IListJobMessagesRequest, options: CallOptions, callback: PaginationCallback<protos.google.dataflow.v1beta3.IListJobMessagesRequest, protos.google.dataflow.v1beta3.IListJobMessagesResponse | null | undefined, protos.google.dataflow.v1beta3.IJobMessage>): void;
Name | Description |
request |
protos.google.dataflow.v1beta3.IListJobMessagesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.dataflow.v1beta3.IListJobMessagesRequest, protos.google.dataflow.v1beta3.IListJobMessagesResponse | null | undefined, protos.google.dataflow.v1beta3.IJobMessage>
|
Type | Description |
void |
listJobMessages(request, callback)
listJobMessages(request: protos.google.dataflow.v1beta3.IListJobMessagesRequest, callback: PaginationCallback<protos.google.dataflow.v1beta3.IListJobMessagesRequest, protos.google.dataflow.v1beta3.IListJobMessagesResponse | null | undefined, protos.google.dataflow.v1beta3.IJobMessage>): void;
Name | Description |
request |
protos.google.dataflow.v1beta3.IListJobMessagesRequest
|
callback |
PaginationCallback<protos.google.dataflow.v1beta3.IListJobMessagesRequest, protos.google.dataflow.v1beta3.IListJobMessagesResponse | null | undefined, protos.google.dataflow.v1beta3.IJobMessage>
|
Type | Description |
void |
listJobMessagesAsync(request, options)
listJobMessagesAsync(request?: protos.google.dataflow.v1beta3.IListJobMessagesRequest, options?: CallOptions): AsyncIterable<protos.google.dataflow.v1beta3.IJobMessage>;
Equivalent to listJobMessages
, 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.dataflow.v1beta3.IListJobMessagesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.dataflow.v1beta3.IJobMessage> | {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 [JobMessage]. 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. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* A project id.
*/
// const projectId = 'abc123'
/**
* The job to get messages about.
*/
// const jobId = 'abc123'
/**
* Filter to only get messages with importance >= level
*/
// const minimumImportance = {}
/**
* If specified, determines the maximum number of messages to
* return. If unspecified, the service may choose an appropriate
* default, or may return an arbitrarily large number of results.
*/
// const pageSize = 1234
/**
* If supplied, this should be the value of next_page_token returned
* by an earlier call. This will cause the next page of results to
* be returned.
*/
// const pageToken = 'abc123'
/**
* If specified, return only messages with timestamps >= start_time.
* The default is the job creation time (i.e. beginning of messages).
*/
// const startTime = {}
/**
* Return only messages with timestamps < end_time.="" the="" default="" is="" now="" *="" (i.e.="" return="" up="" to="" the="" latest="" messages="" available).="" */="" const="" endtime="{}" *="" *="" the="" regional="" endpoint="" *="" (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints)="" that="" *="" contains="" the="" job="" specified="" by="" job_id.="" */="" const="" location='abc123' imports="" the="" dataflow="" library="" const="" {messagesv1beta3client}="require('@google-cloud/dataflow').v1beta3;" instantiates="" a="" client="" const="" dataflowclient="new" messagesv1beta3client();="" async="" function="" calllistjobmessages()="" {="" construct="" request="" const="" request="{" };="" run="" request="" const="" iterable="await" dataflowclient.listjobmessagesasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistjobmessages();="">
listJobMessagesStream(request, options)
listJobMessagesStream(request?: protos.google.dataflow.v1beta3.IListJobMessagesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.dataflow.v1beta3.IListJobMessagesRequest
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 [JobMessage] 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 |