Class v1.DashboardsServiceClient

Manages Stackdriver dashboards. A dashboard is an arrangement of data display widgets in a specific layout. v1

Package

@google-cloud/monitoring-dashboards!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of DashboardsServiceClient.

Parameter
TypeNameDescription
ClientOptionsopts

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

dashboardsServiceStub

dashboardsServiceStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

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.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createDashboard(request, options)

createDashboard(request?: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, options?: CallOptions): Promise<[protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.ICreateDashboardRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | undefined, {} | undefined]>

createDashboard(request, options, callback)

createDashboard(request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, options: CallOptions, callback: Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.ICreateDashboardRequestrequest
CallOptionsoptions
Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

createDashboard(request, callback)

createDashboard(request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, callback: Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.ICreateDashboardRequestrequest
Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

dashboardPath(project, dashboard)

dashboardPath(project: string, dashboard: string): string;

Return a fully-qualified dashboard resource name string.

Parameters
TypeNameDescription
stringproject
stringdashboard
Returns
TypeDescription
string

{string} Resource name string.

deleteDashboard(request, options)

deleteDashboard(request?: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IDeleteDashboardRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | undefined, {} | undefined]>

deleteDashboard(request, options, callback)

deleteDashboard(request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IDeleteDashboardRequestrequest
CallOptionsoptions
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

deleteDashboard(request, callback)

deleteDashboard(request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IDeleteDashboardRequestrequest
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

getDashboard(request, options)

getDashboard(request?: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, options?: CallOptions): Promise<[protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IGetDashboardRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IGetDashboardRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IGetDashboardRequest | undefined, {} | undefined]>

getDashboard(request, options, callback)

getDashboard(request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, options: CallOptions, callback: Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IGetDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IGetDashboardRequestrequest
CallOptionsoptions
Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IGetDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

getDashboard(request, callback)

getDashboard(request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, callback: Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IGetDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IGetDashboardRequestrequest
Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IGetDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
TypeNameDescription
Callback<string, undefined, undefined>callback
Returns
TypeDescription
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.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listDashboards(request, options)

listDashboards(request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options?: CallOptions): Promise<[protos.google.monitoring.dashboard.v1.IDashboard[], protos.google.monitoring.dashboard.v1.IListDashboardsRequest | null, protos.google.monitoring.dashboard.v1.IListDashboardsResponse]>;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IListDashboardsRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.monitoring.dashboard.v1.IDashboard[], protos.google.monitoring.dashboard.v1.IListDashboardsRequest | null, protos.google.monitoring.dashboard.v1.IListDashboardsResponse]>

listDashboards(request, options, callback)

listDashboards(request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options: CallOptions, callback: PaginationCallback<protos.google.monitoring.dashboard.v1.IListDashboardsRequest, protos.google.monitoring.dashboard.v1.IListDashboardsResponse | null | undefined, protos.google.monitoring.dashboard.v1.IDashboard>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IListDashboardsRequestrequest
CallOptionsoptions
PaginationCallback<protos.google.monitoring.dashboard.v1.IListDashboardsRequest, protos.google.monitoring.dashboard.v1.IListDashboardsResponse | null | undefined, protos.google.monitoring.dashboard.v1.IDashboard>callback
Returns
TypeDescription
void

listDashboards(request, callback)

listDashboards(request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, callback: PaginationCallback<protos.google.monitoring.dashboard.v1.IListDashboardsRequest, protos.google.monitoring.dashboard.v1.IListDashboardsResponse | null | undefined, protos.google.monitoring.dashboard.v1.IDashboard>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IListDashboardsRequestrequest
PaginationCallback<protos.google.monitoring.dashboard.v1.IListDashboardsRequest, protos.google.monitoring.dashboard.v1.IListDashboardsResponse | null | undefined, protos.google.monitoring.dashboard.v1.IDashboard>callback
Returns
TypeDescription
void

listDashboardsAsync(request, options)

listDashboardsAsync(request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options?: CallOptions): AsyncIterable<protos.google.monitoring.dashboard.v1.IDashboard>;

Equivalent to listDashboards, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IListDashboardsRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.monitoring.dashboard.v1.IDashboard>

{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 [Dashboard]. 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.

listDashboardsStream(request, options)

listDashboardsStream(request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IListDashboardsRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Dashboard] 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 listDashboardsAsync() 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.

matchDashboardFromDashboardName(dashboardName)

matchDashboardFromDashboardName(dashboardName: string): string | number;

Parse the dashboard from Dashboard resource.

Parameter
TypeNameDescription
stringdashboardName

A fully-qualified path representing Dashboard resource.

Returns
TypeDescription
string | number

{string} A string representing the dashboard.

matchProjectFromDashboardName(dashboardName)

matchProjectFromDashboardName(dashboardName: string): string | number;

Parse the project from Dashboard resource.

Parameter
TypeNameDescription
stringdashboardName

A fully-qualified path representing Dashboard resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
TypeNameDescription
stringprojectName

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
TypeNameDescription
stringproject
Returns
TypeDescription
string

{string} Resource name string.

updateDashboard(request, options)

updateDashboard(request?: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, options?: CallOptions): Promise<[protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IUpdateDashboardRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | undefined, {} | undefined]>

updateDashboard(request, options, callback)

updateDashboard(request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, options: CallOptions, callback: Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IUpdateDashboardRequestrequest
CallOptionsoptions
Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

updateDashboard(request, callback)

updateDashboard(request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, callback: Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.monitoring.dashboard.v1.IUpdateDashboardRequestrequest
Callback<protos.google.monitoring.dashboard.v1.IDashboard, protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void