Send feedback
Class v1.DashboardsServiceClient
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.4.2 keyboard_arrow_down
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
Type Name Description ClientOptions opts
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type Description gax.GoogleAuth
dashboardsServiceStub
dashboardsServiceStub ?: Promise <{
[ name : string ] : Function ;
} >;
Property Value
Type Description Promise <{
[name: string]: Function ;
}>
descriptors
descriptors : Descriptors ;
Property Value
Type Description Descriptors
innerApiCalls
innerApiCalls : {
[ name : string ] : Function ;
} ;
Property Value
Type Description {
[name: string]: Function ;
}
pathTemplates
pathTemplates : {
[ name : string ] : gax.PathTemplate ;
} ;
Property Value
Type Description {
[name: string]: gax.PathTemplate ;
}
port
static get port(): number;
The port for this API service.
Property Value
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value
warn
warn : ( code : string , message : string , warnType ?: string ) = > void ;
Property Value
Type Description (code: string, message: string, warnType?: string) => void
Methods
alertPolicyPath(project, alertPolicy)
alertPolicyPath ( project : string , alertPolicy : string ): string ;
Return a fully-qualified alertPolicy resource name string.
Parameters
Type Name Description string project
string alertPolicy
Returns
Type Description string {string} Resource name string.
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.
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
Type Name Description protos.google.monitoring.dashboard.v1.ICreateDashboardRequest request
CallOptions options
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.ICreateDashboardRequest request
CallOptions options
Callback <protos.google.monitoring.dashboard.v1.IDashboard , protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.ICreateDashboardRequest request
Callback <protos.google.monitoring.dashboard.v1.IDashboard , protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
dashboardPath(project, dashboard)
dashboardPath ( project : string , dashboard : string ): string ;
Return a fully-qualified dashboard resource name string.
Parameters
Type Name Description string project
string dashboard
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest request
CallOptions options
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest request
CallOptions options
Callback <protos.google.protobuf.IEmpty , protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest request
Callback <protos.google.protobuf.IEmpty , protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.IGetDashboardRequest request
CallOptions options
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IGetDashboardRequest request
CallOptions options
Callback <protos.google.monitoring.dashboard.v1.IDashboard , protos.google.monitoring.dashboard.v1.IGetDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.IGetDashboardRequest request
Callback <protos.google.monitoring.dashboard.v1.IDashboard , protos.google.monitoring.dashboard.v1.IGetDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
getProjectId()
getProjectId(): Promise<string>;
Returns
Type Description Promise <string>
getProjectId(callback)
getProjectId ( callback : Callback<string , undefined , undefined> ): void ;
Parameter
Type Name Description Callback <string, undefined, undefined>callback
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.
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
Type Name Description protos.google.monitoring.dashboard.v1.IListDashboardsRequest request
CallOptions options
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IListDashboardsRequest request
CallOptions options
PaginationCallback <protos.google.monitoring.dashboard.v1.IListDashboardsRequest , protos.google.monitoring.dashboard.v1.IListDashboardsResponse | null | undefined, protos.google.monitoring.dashboard.v1.IDashboard >callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.IListDashboardsRequest request
PaginationCallback <protos.google.monitoring.dashboard.v1.IListDashboardsRequest , protos.google.monitoring.dashboard.v1.IListDashboardsResponse | null | undefined, protos.google.monitoring.dashboard.v1.IDashboard >callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.IListDashboardsRequest request
The request object that will be sent.
CallOptions options
Call options. See CallOptions for more details.
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IListDashboardsRequest request
The request object that will be sent.
CallOptions options
Call options. See CallOptions for more details.
Returns
Type Description 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.
matchAlertPolicyFromAlertPolicyName(alertPolicyName)
matchAlertPolicyFromAlertPolicyName ( alertPolicyName : string ): string | number ;
Parse the alert_policy from AlertPolicy resource.
Parameter
Type Name Description string alertPolicyName
A fully-qualified path representing AlertPolicy resource.
Returns
Type Description string | number {string} A string representing the alert_policy.
matchDashboardFromDashboardName(dashboardName)
matchDashboardFromDashboardName ( dashboardName : string ): string | number ;
Parse the dashboard from Dashboard resource.
Parameter
Type Name Description string dashboardName
A fully-qualified path representing Dashboard resource.
Returns
Type Description string | number {string} A string representing the dashboard.
matchProjectFromAlertPolicyName(alertPolicyName)
matchProjectFromAlertPolicyName ( alertPolicyName : string ): string | number ;
Parse the project from AlertPolicy resource.
Parameter
Type Name Description string alertPolicyName
A fully-qualified path representing AlertPolicy resource.
Returns
Type Description string | number {string} A string representing the project.
matchProjectFromDashboardName(dashboardName)
matchProjectFromDashboardName ( dashboardName : string ): string | number ;
Parse the project from Dashboard resource.
Parameter
Type Name Description string dashboardName
A fully-qualified path representing Dashboard resource.
Returns
Type Description string | number {string} A string representing the project.
matchProjectFromProjectName(projectName)
matchProjectFromProjectName ( projectName : string ): string | number ;
Parse the project from Project resource.
Parameter
Type Name Description string projectName
A fully-qualified path representing Project resource.
Returns
Type Description string | number {string} A string representing the project.
projectPath(project)
projectPath ( project : string ): string ;
Return a fully-qualified project resource name string.
Parameter
Type Name Description string project
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest request
CallOptions options
Returns
Type Description 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
Type Name Description protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest request
CallOptions options
Callback <protos.google.monitoring.dashboard.v1.IDashboard , protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
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
Type Name Description protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest request
Callback <protos.google.monitoring.dashboard.v1.IDashboard , protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | null | undefined, {} | null | undefined>callback
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-10 UTC."}