The Cloud Monitoring Service-Oriented Monitoring API has endpoints for managing and querying aspects of a Metrics Scope's services. These include the Service's monitored resources, its Service-Level Objectives, and a taxonomy of categorized Health Metrics. v3
Package
@google-cloud/monitoringConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of ServiceMonitoringServiceClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;descriptors
descriptors: Descriptors;innerApiCalls
innerApiCalls: {
[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.
serviceMonitoringServiceStub
serviceMonitoringServiceStub?: Promise<{
[name: string]: Function;
}>;servicePath
static get servicePath(): string;The DNS address for this API service.
universeDomain
get universeDomain(): string;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.
| Returns | |
|---|---|
| Type | Description |
Promise<void> |
{Promise} A promise that resolves when the client is closed. |
createService(request, options)
createService(request?: protos.google.monitoring.v3.ICreateServiceRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IService,
protos.google.monitoring.v3.ICreateServiceRequest | undefined,
{} | undefined
]>;Create a Service.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IService,
protos.google.monitoring.v3.ICreateServiceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Required. Resource
* name (https://cloud.google.com/monitoring/api/v3#project_name) of the
* parent Metrics Scope. The format is:
* projects/[PROJECT_ID_OR_NUMBER]
*/
// const parent = 'abc123'
/**
* Optional. The Service id to use for this Service. If omitted, an id will be
* generated instead. Must match the pattern `[a-z0-9\-]+`
*/
// const serviceId = 'abc123'
/**
* Required. The `Service` to create.
*/
// const service = {}
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callCreateService() {
// Construct request
const request = {
parent,
service,
};
// Run request
const response = await monitoringClient.createService(request);
console.log(response);
}
callCreateService();
createService(request, options, callback)
createService(request: protos.google.monitoring.v3.ICreateServiceRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createService(request, callback)
createService(request: protos.google.monitoring.v3.ICreateServiceRequest, callback: Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateServiceRequest
|
callback |
Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createServiceLevelObjective(request, options)
createServiceLevelObjective(request?: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IServiceLevelObjective,
(protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | undefined),
{} | undefined
]>;Create a ServiceLevelObjective for the given Service.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateServiceLevelObjectiveRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IServiceLevelObjective,
(protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Required. Resource name of the parent `Service`. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
*/
// const parent = 'abc123'
/**
* Optional. The ServiceLevelObjective id to use for this
* ServiceLevelObjective. If omitted, an id will be generated instead. Must
* match the pattern `^[a-zA-Z0-9-_:.]+$`
*/
// const serviceLevelObjectiveId = 'abc123'
/**
* Required. The `ServiceLevelObjective` to create.
* The provided `name` will be respected if no `ServiceLevelObjective` exists
* with this name.
*/
// const serviceLevelObjective = {}
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callCreateServiceLevelObjective() {
// Construct request
const request = {
parent,
serviceLevelObjective,
};
// Run request
const response = await monitoringClient.createServiceLevelObjective(request);
console.log(response);
}
callCreateServiceLevelObjective();
createServiceLevelObjective(request, options, callback)
createServiceLevelObjective(request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateServiceLevelObjectiveRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createServiceLevelObjective(request, callback)
createServiceLevelObjective(request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, callback: Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateServiceLevelObjectiveRequest
|
callback |
Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteService(request, options)
deleteService(request?: protos.google.monitoring.v3.IDeleteServiceRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.monitoring.v3.IDeleteServiceRequest | undefined,
{} | undefined
]>;Soft delete this Service.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteServiceRequest
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.monitoring.v3.IDeleteServiceRequest | 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 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.
*/
/**
* Required. Resource name of the `Service` to delete. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
*/
// const name = 'abc123'
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callDeleteService() {
// Construct request
const request = {
name,
};
// Run request
const response = await monitoringClient.deleteService(request);
console.log(response);
}
callDeleteService();
deleteService(request, options, callback)
deleteService(request: protos.google.monitoring.v3.IDeleteServiceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteService(request, callback)
deleteService(request: protos.google.monitoring.v3.IDeleteServiceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteServiceRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteServiceLevelObjective(request, options)
deleteServiceLevelObjective(request?: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | undefined),
{} | undefined
]>;Delete the given ServiceLevelObjective.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteServiceLevelObjectiveRequest
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.monitoring.v3.IDeleteServiceLevelObjectiveRequest | 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 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.
*/
/**
* Required. Resource name of the `ServiceLevelObjective` to delete. The
* format is:
* projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
*/
// const name = 'abc123'
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callDeleteServiceLevelObjective() {
// Construct request
const request = {
name,
};
// Run request
const response = await monitoringClient.deleteServiceLevelObjective(request);
console.log(response);
}
callDeleteServiceLevelObjective();
deleteServiceLevelObjective(request, options, callback)
deleteServiceLevelObjective(request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteServiceLevelObjectiveRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteServiceLevelObjective(request, callback)
deleteServiceLevelObjective(request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteServiceLevelObjectiveRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
folderAlertPolicyConditionPath(folder, alertPolicy, condition)
folderAlertPolicyConditionPath(folder: string, alertPolicy: string, condition: string): string;Return a fully-qualified folderAlertPolicyCondition resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
alertPolicy |
string
|
condition |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderAlertPolicyPath(folder, alertPolicy)
folderAlertPolicyPath(folder: string, alertPolicy: string): string;Return a fully-qualified folderAlertPolicy resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
alertPolicy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderChannelDescriptorPath(folder, channelDescriptor)
folderChannelDescriptorPath(folder: string, channelDescriptor: string): string;Return a fully-qualified folderChannelDescriptor resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
channelDescriptor |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderGroupPath(folder, group)
folderGroupPath(folder: string, group: string): string;Return a fully-qualified folderGroup resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
group |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderNotificationChannelPath(folder, notificationChannel)
folderNotificationChannelPath(folder: string, notificationChannel: string): string;Return a fully-qualified folderNotificationChannel resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
notificationChannel |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderServicePath(folder, service)
folderServicePath(folder: string, service: string): string;Return a fully-qualified folderService resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
service |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderServiceServiceLevelObjectivePath(folder, service, serviceLevelObjective)
folderServiceServiceLevelObjectivePath(folder: string, service: string, serviceLevelObjective: string): string;Return a fully-qualified folderServiceServiceLevelObjective resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
service |
string
|
serviceLevelObjective |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
folderUptimeCheckConfigPath(folder, uptimeCheckConfig)
folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string): string;Return a fully-qualified folderUptimeCheckConfig resource name string.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
uptimeCheckConfig |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
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 | |
|---|---|
| Type | Description |
void |
|
getService(request, options)
getService(request?: protos.google.monitoring.v3.IGetServiceRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IService,
protos.google.monitoring.v3.IGetServiceRequest | undefined,
{} | undefined
]>;Get the named Service.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IService,
protos.google.monitoring.v3.IGetServiceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Required. Resource name of the `Service`. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
*/
// const name = 'abc123'
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callGetService() {
// Construct request
const request = {
name,
};
// Run request
const response = await monitoringClient.getService(request);
console.log(response);
}
callGetService();
getService(request, options, callback)
getService(request: protos.google.monitoring.v3.IGetServiceRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IGetServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IGetServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getService(request, callback)
getService(request: protos.google.monitoring.v3.IGetServiceRequest, callback: Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IGetServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetServiceRequest
|
callback |
Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IGetServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getServiceLevelObjective(request, options)
getServiceLevelObjective(request?: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IServiceLevelObjective,
protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | undefined,
{} | undefined
]>;Get a ServiceLevelObjective by name.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetServiceLevelObjectiveRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IServiceLevelObjective,
protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Required. Resource name of the `ServiceLevelObjective` to get. The format
* is:
* projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
*/
// const name = 'abc123'
/**
* View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
* `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
* `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
* `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
*/
// const view = {}
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callGetServiceLevelObjective() {
// Construct request
const request = {
name,
};
// Run request
const response = await monitoringClient.getServiceLevelObjective(request);
console.log(response);
}
callGetServiceLevelObjective();
getServiceLevelObjective(request, options, callback)
getServiceLevelObjective(request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetServiceLevelObjectiveRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getServiceLevelObjective(request, callback)
getServiceLevelObjective(request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, callback: Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetServiceLevelObjectiveRequest
|
callback |
Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| 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.
| Returns | |
|---|---|
| Type | Description |
Promise<{
[name: string]: Function;
}> |
{Promise} A promise that resolves to an authenticated service stub. |
listServiceLevelObjectives(request, options)
listServiceLevelObjectives(request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IServiceLevelObjective[],
protos.google.monitoring.v3.IListServiceLevelObjectivesRequest | null,
protos.google.monitoring.v3.IListServiceLevelObjectivesResponse
]>;List the ServiceLevelObjectives for the given Service.
| Parameters | |
|---|---|
| Name | Description |
request |
IListServiceLevelObjectivesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IServiceLevelObjective[],
protos.google.monitoring.v3.IListServiceLevelObjectivesRequest | null,
protos.google.monitoring.v3.IListServiceLevelObjectivesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listServiceLevelObjectives(request, options, callback)
listServiceLevelObjectives(request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options: CallOptions, callback: PaginationCallback<protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, protos.google.monitoring.v3.IListServiceLevelObjectivesResponse | null | undefined, protos.google.monitoring.v3.IServiceLevelObjective>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListServiceLevelObjectivesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, protos.google.monitoring.v3.IListServiceLevelObjectivesResponse | null | undefined, protos.google.monitoring.v3.IServiceLevelObjective>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listServiceLevelObjectives(request, callback)
listServiceLevelObjectives(request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, callback: PaginationCallback<protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, protos.google.monitoring.v3.IListServiceLevelObjectivesResponse | null | undefined, protos.google.monitoring.v3.IServiceLevelObjective>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListServiceLevelObjectivesRequest
|
callback |
PaginationCallback<protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, protos.google.monitoring.v3.IListServiceLevelObjectivesResponse | null | undefined, protos.google.monitoring.v3.IServiceLevelObjective>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listServiceLevelObjectivesAsync(request, options)
listServiceLevelObjectivesAsync(request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options?: CallOptions): AsyncIterable<protos.google.monitoring.v3.IServiceLevelObjective>;Equivalent to listServiceLevelObjectives, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListServiceLevelObjectivesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.monitoring.v3.IServiceLevelObjective> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 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.
*/
/**
* Required. Resource name of the parent containing the listed SLOs, either a
* project or a Monitoring Metrics Scope. The formats are:
* projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/-
*/
// const parent = 'abc123'
/**
* A filter specifying what `ServiceLevelObjective`s to return.
*/
// const filter = 'abc123'
/**
* A non-negative number that is the maximum number of results to return.
* When 0, use default page size.
*/
// const pageSize = 1234
/**
* If this field is not empty then it must contain the `nextPageToken` value
* returned by a previous call to this method. Using this field causes the
* method to return additional results from the previous method call.
*/
// const pageToken = 'abc123'
/**
* View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each
* `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
* `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
* `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
*/
// const view = {}
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callListServiceLevelObjectives() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = monitoringClient.listServiceLevelObjectivesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListServiceLevelObjectives();
listServiceLevelObjectivesStream(request, options)
listServiceLevelObjectivesStream(request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options?: CallOptions): Transform;Equivalent to listServiceLevelObjectives, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListServiceLevelObjectivesRequest
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 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 |
listServices(request, options)
listServices(request?: protos.google.monitoring.v3.IListServicesRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IService[],
protos.google.monitoring.v3.IListServicesRequest | null,
protos.google.monitoring.v3.IListServicesResponse
]>;List Services for this Metrics Scope.
| Parameters | |
|---|---|
| Name | Description |
request |
IListServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IService[],
protos.google.monitoring.v3.IListServicesRequest | null,
protos.google.monitoring.v3.IListServicesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listServices(request, options, callback)
listServices(request: protos.google.monitoring.v3.IListServicesRequest, options: CallOptions, callback: PaginationCallback<protos.google.monitoring.v3.IListServicesRequest, protos.google.monitoring.v3.IListServicesResponse | null | undefined, protos.google.monitoring.v3.IService>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListServicesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.monitoring.v3.IListServicesRequest, protos.google.monitoring.v3.IListServicesResponse | null | undefined, protos.google.monitoring.v3.IService>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listServices(request, callback)
listServices(request: protos.google.monitoring.v3.IListServicesRequest, callback: PaginationCallback<protos.google.monitoring.v3.IListServicesRequest, protos.google.monitoring.v3.IListServicesResponse | null | undefined, protos.google.monitoring.v3.IService>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListServicesRequest
|
callback |
PaginationCallback<protos.google.monitoring.v3.IListServicesRequest, protos.google.monitoring.v3.IListServicesResponse | null | undefined, protos.google.monitoring.v3.IService>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listServicesAsync(request, options)
listServicesAsync(request?: protos.google.monitoring.v3.IListServicesRequest, options?: CallOptions): AsyncIterable<protos.google.monitoring.v3.IService>;Equivalent to listServices, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.monitoring.v3.IService> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 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.
*/
/**
* Required. Resource name of the parent containing the listed services,
* either a project (https://cloud.google.com/monitoring/api/v3#project_name)
* or a Monitoring Metrics Scope. The formats are:
* projects/[PROJECT_ID_OR_NUMBER]
* workspaces/[HOST_PROJECT_ID_OR_NUMBER]
*/
// const parent = 'abc123'
/**
* A filter specifying what `Service`s to return. The filter supports
* filtering on a particular service-identifier type or one of its attributes.
* To filter on a particular service-identifier type, the `identifier_case`
* refers to which option in the `identifier` field is populated. For example,
* the filter `identifier_case = "CUSTOM"` would match all services with a
* value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE",
* "MESH_ISTIO", and the other options listed at
* https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service
* To filter on an attribute of a service-identifier type, apply the filter
* name by using the snake case of the service-identifier type and the
* attribute of that service-identifier type, and join the two with a period.
* For example, to filter by the `meshUid` field of the `MeshIstio`
* service-identifier type, you must filter on `mesh_istio.mesh_uid =
* "123"` to match all services with mesh UID "123". Service-identifier types
* and their attributes are described at
* https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service
*/
// const filter = 'abc123'
/**
* A non-negative number that is the maximum number of results to return.
* When 0, use default page size.
*/
// const pageSize = 1234
/**
* If this field is not empty then it must contain the `nextPageToken` value
* returned by a previous call to this method. Using this field causes the
* method to return additional results from the previous method call.
*/
// const pageToken = 'abc123'
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callListServices() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = monitoringClient.listServicesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListServices();
listServicesStream(request, options)
listServicesStream(request?: protos.google.monitoring.v3.IListServicesRequest, options?: CallOptions): Transform;Equivalent to listServices, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListServicesRequest
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 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 |
matchAlertPolicyFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName)
matchAlertPolicyFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName: string): string | number;Parse the alert_policy from FolderAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
folderAlertPolicyConditionName |
string
A fully-qualified path representing folder_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the alert_policy. |
matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName)
matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string): string | number;Parse the alert_policy from FolderAlertPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
folderAlertPolicyName |
string
A fully-qualified path representing folder_alert_policy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the alert_policy. |
matchAlertPolicyFromOrganizationAlertPolicyConditionName(organizationAlertPolicyConditionName)
matchAlertPolicyFromOrganizationAlertPolicyConditionName(organizationAlertPolicyConditionName: string): string | number;Parse the alert_policy from OrganizationAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
organizationAlertPolicyConditionName |
string
A fully-qualified path representing organization_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the alert_policy. |
matchAlertPolicyFromOrganizationAlertPolicyName(organizationAlertPolicyName)
matchAlertPolicyFromOrganizationAlertPolicyName(organizationAlertPolicyName: string): string | number;Parse the alert_policy from OrganizationAlertPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
organizationAlertPolicyName |
string
A fully-qualified path representing organization_alert_policy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the alert_policy. |
matchAlertPolicyFromProjectAlertPolicyConditionName(projectAlertPolicyConditionName)
matchAlertPolicyFromProjectAlertPolicyConditionName(projectAlertPolicyConditionName: string): string | number;Parse the alert_policy from ProjectAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
projectAlertPolicyConditionName |
string
A fully-qualified path representing project_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the alert_policy. |
matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName)
matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string): string | number;Parse the alert_policy from ProjectAlertPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
projectAlertPolicyName |
string
A fully-qualified path representing project_alert_policy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the alert_policy. |
matchChannelDescriptorFromFolderChannelDescriptorName(folderChannelDescriptorName)
matchChannelDescriptorFromFolderChannelDescriptorName(folderChannelDescriptorName: string): string | number;Parse the channel_descriptor from FolderChannelDescriptor resource.
| Parameter | |
|---|---|
| Name | Description |
folderChannelDescriptorName |
string
A fully-qualified path representing folder_channel_descriptor resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the channel_descriptor. |
matchChannelDescriptorFromOrganizationChannelDescriptorName(organizationChannelDescriptorName)
matchChannelDescriptorFromOrganizationChannelDescriptorName(organizationChannelDescriptorName: string): string | number;Parse the channel_descriptor from OrganizationChannelDescriptor resource.
| Parameter | |
|---|---|
| Name | Description |
organizationChannelDescriptorName |
string
A fully-qualified path representing organization_channel_descriptor resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the channel_descriptor. |
matchChannelDescriptorFromProjectChannelDescriptorName(projectChannelDescriptorName)
matchChannelDescriptorFromProjectChannelDescriptorName(projectChannelDescriptorName: string): string | number;Parse the channel_descriptor from ProjectChannelDescriptor resource.
| Parameter | |
|---|---|
| Name | Description |
projectChannelDescriptorName |
string
A fully-qualified path representing project_channel_descriptor resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the channel_descriptor. |
matchConditionFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName)
matchConditionFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName: string): string | number;Parse the condition from FolderAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
folderAlertPolicyConditionName |
string
A fully-qualified path representing folder_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the condition. |
matchConditionFromOrganizationAlertPolicyConditionName(organizationAlertPolicyConditionName)
matchConditionFromOrganizationAlertPolicyConditionName(organizationAlertPolicyConditionName: string): string | number;Parse the condition from OrganizationAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
organizationAlertPolicyConditionName |
string
A fully-qualified path representing organization_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the condition. |
matchConditionFromProjectAlertPolicyConditionName(projectAlertPolicyConditionName)
matchConditionFromProjectAlertPolicyConditionName(projectAlertPolicyConditionName: string): string | number;Parse the condition from ProjectAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
projectAlertPolicyConditionName |
string
A fully-qualified path representing project_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the condition. |
matchFolderFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName)
matchFolderFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName: string): string | number;Parse the folder from FolderAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
folderAlertPolicyConditionName |
string
A fully-qualified path representing folder_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderAlertPolicyName(folderAlertPolicyName)
matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string): string | number;Parse the folder from FolderAlertPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
folderAlertPolicyName |
string
A fully-qualified path representing folder_alert_policy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderChannelDescriptorName(folderChannelDescriptorName)
matchFolderFromFolderChannelDescriptorName(folderChannelDescriptorName: string): string | number;Parse the folder from FolderChannelDescriptor resource.
| Parameter | |
|---|---|
| Name | Description |
folderChannelDescriptorName |
string
A fully-qualified path representing folder_channel_descriptor resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderGroupName(folderGroupName)
matchFolderFromFolderGroupName(folderGroupName: string): string | number;Parse the folder from FolderGroup resource.
| Parameter | |
|---|---|
| Name | Description |
folderGroupName |
string
A fully-qualified path representing folder_group resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderNotificationChannelName(folderNotificationChannelName)
matchFolderFromFolderNotificationChannelName(folderNotificationChannelName: string): string | number;Parse the folder from FolderNotificationChannel resource.
| Parameter | |
|---|---|
| Name | Description |
folderNotificationChannelName |
string
A fully-qualified path representing folder_notification_channel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderServiceName(folderServiceName)
matchFolderFromFolderServiceName(folderServiceName: string): string | number;Parse the folder from FolderService resource.
| Parameter | |
|---|---|
| Name | Description |
folderServiceName |
string
A fully-qualified path representing folder_service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderServiceServiceLevelObjectiveName(folderServiceServiceLevelObjectiveName)
matchFolderFromFolderServiceServiceLevelObjectiveName(folderServiceServiceLevelObjectiveName: string): string | number;Parse the folder from FolderServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
folderServiceServiceLevelObjectiveName |
string
A fully-qualified path representing folder_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchFolderFromFolderUptimeCheckConfigName(folderUptimeCheckConfigName)
matchFolderFromFolderUptimeCheckConfigName(folderUptimeCheckConfigName: string): string | number;Parse the folder from FolderUptimeCheckConfig resource.
| Parameter | |
|---|---|
| Name | Description |
folderUptimeCheckConfigName |
string
A fully-qualified path representing folder_uptime_check_config resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the folder. |
matchGroupFromFolderGroupName(folderGroupName)
matchGroupFromFolderGroupName(folderGroupName: string): string | number;Parse the group from FolderGroup resource.
| Parameter | |
|---|---|
| Name | Description |
folderGroupName |
string
A fully-qualified path representing folder_group resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the group. |
matchGroupFromOrganizationGroupName(organizationGroupName)
matchGroupFromOrganizationGroupName(organizationGroupName: string): string | number;Parse the group from OrganizationGroup resource.
| Parameter | |
|---|---|
| Name | Description |
organizationGroupName |
string
A fully-qualified path representing organization_group resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the group. |
matchGroupFromProjectGroupName(projectGroupName)
matchGroupFromProjectGroupName(projectGroupName: string): string | number;Parse the group from ProjectGroup resource.
| Parameter | |
|---|---|
| Name | Description |
projectGroupName |
string
A fully-qualified path representing project_group resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the group. |
matchNotificationChannelFromFolderNotificationChannelName(folderNotificationChannelName)
matchNotificationChannelFromFolderNotificationChannelName(folderNotificationChannelName: string): string | number;Parse the notification_channel from FolderNotificationChannel resource.
| Parameter | |
|---|---|
| Name | Description |
folderNotificationChannelName |
string
A fully-qualified path representing folder_notification_channel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the notification_channel. |
matchNotificationChannelFromOrganizationNotificationChannelName(organizationNotificationChannelName)
matchNotificationChannelFromOrganizationNotificationChannelName(organizationNotificationChannelName: string): string | number;Parse the notification_channel from OrganizationNotificationChannel resource.
| Parameter | |
|---|---|
| Name | Description |
organizationNotificationChannelName |
string
A fully-qualified path representing organization_notification_channel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the notification_channel. |
matchNotificationChannelFromProjectNotificationChannelName(projectNotificationChannelName)
matchNotificationChannelFromProjectNotificationChannelName(projectNotificationChannelName: string): string | number;Parse the notification_channel from ProjectNotificationChannel resource.
| Parameter | |
|---|---|
| Name | Description |
projectNotificationChannelName |
string
A fully-qualified path representing project_notification_channel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the notification_channel. |
matchOrganizationFromOrganizationAlertPolicyConditionName(organizationAlertPolicyConditionName)
matchOrganizationFromOrganizationAlertPolicyConditionName(organizationAlertPolicyConditionName: string): string | number;Parse the organization from OrganizationAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
organizationAlertPolicyConditionName |
string
A fully-qualified path representing organization_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationAlertPolicyName(organizationAlertPolicyName)
matchOrganizationFromOrganizationAlertPolicyName(organizationAlertPolicyName: string): string | number;Parse the organization from OrganizationAlertPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
organizationAlertPolicyName |
string
A fully-qualified path representing organization_alert_policy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationChannelDescriptorName(organizationChannelDescriptorName)
matchOrganizationFromOrganizationChannelDescriptorName(organizationChannelDescriptorName: string): string | number;Parse the organization from OrganizationChannelDescriptor resource.
| Parameter | |
|---|---|
| Name | Description |
organizationChannelDescriptorName |
string
A fully-qualified path representing organization_channel_descriptor resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationGroupName(organizationGroupName)
matchOrganizationFromOrganizationGroupName(organizationGroupName: string): string | number;Parse the organization from OrganizationGroup resource.
| Parameter | |
|---|---|
| Name | Description |
organizationGroupName |
string
A fully-qualified path representing organization_group resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationNotificationChannelName(organizationNotificationChannelName)
matchOrganizationFromOrganizationNotificationChannelName(organizationNotificationChannelName: string): string | number;Parse the organization from OrganizationNotificationChannel resource.
| Parameter | |
|---|---|
| Name | Description |
organizationNotificationChannelName |
string
A fully-qualified path representing organization_notification_channel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationServiceName(organizationServiceName)
matchOrganizationFromOrganizationServiceName(organizationServiceName: string): string | number;Parse the organization from OrganizationService resource.
| Parameter | |
|---|---|
| Name | Description |
organizationServiceName |
string
A fully-qualified path representing organization_service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationServiceServiceLevelObjectiveName(organizationServiceServiceLevelObjectiveName)
matchOrganizationFromOrganizationServiceServiceLevelObjectiveName(organizationServiceServiceLevelObjectiveName: string): string | number;Parse the organization from OrganizationServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
organizationServiceServiceLevelObjectiveName |
string
A fully-qualified path representing organization_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchOrganizationFromOrganizationUptimeCheckConfigName(organizationUptimeCheckConfigName)
matchOrganizationFromOrganizationUptimeCheckConfigName(organizationUptimeCheckConfigName: string): string | number;Parse the organization from OrganizationUptimeCheckConfig resource.
| Parameter | |
|---|---|
| Name | Description |
organizationUptimeCheckConfigName |
string
A fully-qualified path representing organization_uptime_check_config resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the organization. |
matchProjectFromProjectAlertPolicyConditionName(projectAlertPolicyConditionName)
matchProjectFromProjectAlertPolicyConditionName(projectAlertPolicyConditionName: string): string | number;Parse the project from ProjectAlertPolicyCondition resource.
| Parameter | |
|---|---|
| Name | Description |
projectAlertPolicyConditionName |
string
A fully-qualified path representing project_alert_policy_condition resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectAlertPolicyName(projectAlertPolicyName)
matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string): string | number;Parse the project from ProjectAlertPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
projectAlertPolicyName |
string
A fully-qualified path representing project_alert_policy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectChannelDescriptorName(projectChannelDescriptorName)
matchProjectFromProjectChannelDescriptorName(projectChannelDescriptorName: string): string | number;Parse the project from ProjectChannelDescriptor resource.
| Parameter | |
|---|---|
| Name | Description |
projectChannelDescriptorName |
string
A fully-qualified path representing project_channel_descriptor resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectGroupName(projectGroupName)
matchProjectFromProjectGroupName(projectGroupName: string): string | number;Parse the project from ProjectGroup resource.
| Parameter | |
|---|---|
| Name | Description |
projectGroupName |
string
A fully-qualified path representing project_group 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 | |
|---|---|
| Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectNotificationChannelName(projectNotificationChannelName)
matchProjectFromProjectNotificationChannelName(projectNotificationChannelName: string): string | number;Parse the project from ProjectNotificationChannel resource.
| Parameter | |
|---|---|
| Name | Description |
projectNotificationChannelName |
string
A fully-qualified path representing project_notification_channel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectServiceName(projectServiceName)
matchProjectFromProjectServiceName(projectServiceName: string): string | number;Parse the project from ProjectService resource.
| Parameter | |
|---|---|
| Name | Description |
projectServiceName |
string
A fully-qualified path representing project_service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectServiceServiceLevelObjectiveName(projectServiceServiceLevelObjectiveName)
matchProjectFromProjectServiceServiceLevelObjectiveName(projectServiceServiceLevelObjectiveName: string): string | number;Parse the project from ProjectServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
projectServiceServiceLevelObjectiveName |
string
A fully-qualified path representing project_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectUptimeCheckConfigName(projectUptimeCheckConfigName)
matchProjectFromProjectUptimeCheckConfigName(projectUptimeCheckConfigName: string): string | number;Parse the project from ProjectUptimeCheckConfig resource.
| Parameter | |
|---|---|
| Name | Description |
projectUptimeCheckConfigName |
string
A fully-qualified path representing project_uptime_check_config resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromSnoozeName(snoozeName)
matchProjectFromSnoozeName(snoozeName: string): string | number;Parse the project from Snooze resource.
| Parameter | |
|---|---|
| Name | Description |
snoozeName |
string
A fully-qualified path representing Snooze resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchServiceFromFolderServiceName(folderServiceName)
matchServiceFromFolderServiceName(folderServiceName: string): string | number;Parse the service from FolderService resource.
| Parameter | |
|---|---|
| Name | Description |
folderServiceName |
string
A fully-qualified path representing folder_service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchServiceFromFolderServiceServiceLevelObjectiveName(folderServiceServiceLevelObjectiveName)
matchServiceFromFolderServiceServiceLevelObjectiveName(folderServiceServiceLevelObjectiveName: string): string | number;Parse the service from FolderServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
folderServiceServiceLevelObjectiveName |
string
A fully-qualified path representing folder_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchServiceFromOrganizationServiceName(organizationServiceName)
matchServiceFromOrganizationServiceName(organizationServiceName: string): string | number;Parse the service from OrganizationService resource.
| Parameter | |
|---|---|
| Name | Description |
organizationServiceName |
string
A fully-qualified path representing organization_service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchServiceFromOrganizationServiceServiceLevelObjectiveName(organizationServiceServiceLevelObjectiveName)
matchServiceFromOrganizationServiceServiceLevelObjectiveName(organizationServiceServiceLevelObjectiveName: string): string | number;Parse the service from OrganizationServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
organizationServiceServiceLevelObjectiveName |
string
A fully-qualified path representing organization_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchServiceFromProjectServiceName(projectServiceName)
matchServiceFromProjectServiceName(projectServiceName: string): string | number;Parse the service from ProjectService resource.
| Parameter | |
|---|---|
| Name | Description |
projectServiceName |
string
A fully-qualified path representing project_service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchServiceFromProjectServiceServiceLevelObjectiveName(projectServiceServiceLevelObjectiveName)
matchServiceFromProjectServiceServiceLevelObjectiveName(projectServiceServiceLevelObjectiveName: string): string | number;Parse the service from ProjectServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
projectServiceServiceLevelObjectiveName |
string
A fully-qualified path representing project_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName(folderServiceServiceLevelObjectiveName)
matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName(folderServiceServiceLevelObjectiveName: string): string | number;Parse the service_level_objective from FolderServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
folderServiceServiceLevelObjectiveName |
string
A fully-qualified path representing folder_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service_level_objective. |
matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName(organizationServiceServiceLevelObjectiveName)
matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName(organizationServiceServiceLevelObjectiveName: string): string | number;Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
organizationServiceServiceLevelObjectiveName |
string
A fully-qualified path representing organization_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service_level_objective. |
matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName(projectServiceServiceLevelObjectiveName)
matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName(projectServiceServiceLevelObjectiveName: string): string | number;Parse the service_level_objective from ProjectServiceServiceLevelObjective resource.
| Parameter | |
|---|---|
| Name | Description |
projectServiceServiceLevelObjectiveName |
string
A fully-qualified path representing project_service_service_level_objective resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service_level_objective. |
matchSnoozeFromSnoozeName(snoozeName)
matchSnoozeFromSnoozeName(snoozeName: string): string | number;Parse the snooze from Snooze resource.
| Parameter | |
|---|---|
| Name | Description |
snoozeName |
string
A fully-qualified path representing Snooze resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the snooze. |
matchUptimeCheckConfigFromFolderUptimeCheckConfigName(folderUptimeCheckConfigName)
matchUptimeCheckConfigFromFolderUptimeCheckConfigName(folderUptimeCheckConfigName: string): string | number;Parse the uptime_check_config from FolderUptimeCheckConfig resource.
| Parameter | |
|---|---|
| Name | Description |
folderUptimeCheckConfigName |
string
A fully-qualified path representing folder_uptime_check_config resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the uptime_check_config. |
matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName(organizationUptimeCheckConfigName)
matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName(organizationUptimeCheckConfigName: string): string | number;Parse the uptime_check_config from OrganizationUptimeCheckConfig resource.
| Parameter | |
|---|---|
| Name | Description |
organizationUptimeCheckConfigName |
string
A fully-qualified path representing organization_uptime_check_config resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the uptime_check_config. |
matchUptimeCheckConfigFromProjectUptimeCheckConfigName(projectUptimeCheckConfigName)
matchUptimeCheckConfigFromProjectUptimeCheckConfigName(projectUptimeCheckConfigName: string): string | number;Parse the uptime_check_config from ProjectUptimeCheckConfig resource.
| Parameter | |
|---|---|
| Name | Description |
projectUptimeCheckConfigName |
string
A fully-qualified path representing project_uptime_check_config resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the uptime_check_config. |
organizationAlertPolicyConditionPath(organization, alertPolicy, condition)
organizationAlertPolicyConditionPath(organization: string, alertPolicy: string, condition: string): string;Return a fully-qualified organizationAlertPolicyCondition resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
alertPolicy |
string
|
condition |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationAlertPolicyPath(organization, alertPolicy)
organizationAlertPolicyPath(organization: string, alertPolicy: string): string;Return a fully-qualified organizationAlertPolicy resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
alertPolicy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationChannelDescriptorPath(organization, channelDescriptor)
organizationChannelDescriptorPath(organization: string, channelDescriptor: string): string;Return a fully-qualified organizationChannelDescriptor resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
channelDescriptor |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationGroupPath(organization, group)
organizationGroupPath(organization: string, group: string): string;Return a fully-qualified organizationGroup resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
group |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationNotificationChannelPath(organization, notificationChannel)
organizationNotificationChannelPath(organization: string, notificationChannel: string): string;Return a fully-qualified organizationNotificationChannel resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
notificationChannel |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationServicePath(organization, service)
organizationServicePath(organization: string, service: string): string;Return a fully-qualified organizationService resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
service |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationServiceServiceLevelObjectivePath(organization, service, serviceLevelObjective)
organizationServiceServiceLevelObjectivePath(organization: string, service: string, serviceLevelObjective: string): string;Return a fully-qualified organizationServiceServiceLevelObjective resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
service |
string
|
serviceLevelObjective |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
organizationUptimeCheckConfigPath(organization, uptimeCheckConfig)
organizationUptimeCheckConfigPath(organization: string, uptimeCheckConfig: string): string;Return a fully-qualified organizationUptimeCheckConfig resource name string.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
uptimeCheckConfig |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectAlertPolicyConditionPath(project, alertPolicy, condition)
projectAlertPolicyConditionPath(project: string, alertPolicy: string, condition: string): string;Return a fully-qualified projectAlertPolicyCondition resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
alertPolicy |
string
|
condition |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectAlertPolicyPath(project, alertPolicy)
projectAlertPolicyPath(project: string, alertPolicy: string): string;Return a fully-qualified projectAlertPolicy resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
alertPolicy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectChannelDescriptorPath(project, channelDescriptor)
projectChannelDescriptorPath(project: string, channelDescriptor: string): string;Return a fully-qualified projectChannelDescriptor resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
channelDescriptor |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectGroupPath(project, group)
projectGroupPath(project: string, group: string): string;Return a fully-qualified projectGroup resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
group |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectNotificationChannelPath(project, notificationChannel)
projectNotificationChannelPath(project: string, notificationChannel: string): string;Return a fully-qualified projectNotificationChannel resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
notificationChannel |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectPath(project)
projectPath(project: string): string;Return a fully-qualified project resource name string.
| Parameter | |
|---|---|
| Name | Description |
project |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectServicePath(project, service)
projectServicePath(project: string, service: string): string;Return a fully-qualified projectService resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
service |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectServiceServiceLevelObjectivePath(project, service, serviceLevelObjective)
projectServiceServiceLevelObjectivePath(project: string, service: string, serviceLevelObjective: string): string;Return a fully-qualified projectServiceServiceLevelObjective resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
service |
string
|
serviceLevelObjective |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectUptimeCheckConfigPath(project, uptimeCheckConfig)
projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string): string;Return a fully-qualified projectUptimeCheckConfig resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
uptimeCheckConfig |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
snoozePath(project, snooze)
snoozePath(project: string, snooze: string): string;Return a fully-qualified snooze resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
snooze |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
updateService(request, options)
updateService(request?: protos.google.monitoring.v3.IUpdateServiceRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IService,
protos.google.monitoring.v3.IUpdateServiceRequest | undefined,
{} | undefined
]>;Update this Service.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IService,
protos.google.monitoring.v3.IUpdateServiceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Required. The `Service` to draw updates from.
* The given `name` specifies the resource to update.
*/
// const service = {}
/**
* A set of field paths defining which fields to use for the update.
*/
// const updateMask = {}
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callUpdateService() {
// Construct request
const request = {
service,
};
// Run request
const response = await monitoringClient.updateService(request);
console.log(response);
}
callUpdateService();
updateService(request, options, callback)
updateService(request: protos.google.monitoring.v3.IUpdateServiceRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateService(request, callback)
updateService(request: protos.google.monitoring.v3.IUpdateServiceRequest, callback: Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateServiceRequest
|
callback |
Callback<protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateServiceLevelObjective(request, options)
updateServiceLevelObjective(request?: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IServiceLevelObjective,
(protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | undefined),
{} | undefined
]>;Update the given ServiceLevelObjective.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateServiceLevelObjectiveRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IServiceLevelObjective,
(protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Required. The `ServiceLevelObjective` to draw updates from.
* The given `name` specifies the resource to update.
*/
// const serviceLevelObjective = {}
/**
* A set of field paths defining which fields to use for the update.
*/
// const updateMask = {}
// Imports the Monitoring library
const {ServiceMonitoringServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new ServiceMonitoringServiceClient();
async function callUpdateServiceLevelObjective() {
// Construct request
const request = {
serviceLevelObjective,
};
// Run request
const response = await monitoringClient.updateServiceLevelObjective(request);
console.log(response);
}
callUpdateServiceLevelObjective();
updateServiceLevelObjective(request, options, callback)
updateServiceLevelObjective(request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateServiceLevelObjectiveRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateServiceLevelObjective(request, callback)
updateServiceLevelObjective(request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, callback: Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateServiceLevelObjectiveRequest
|
callback |
Callback<protos.google.monitoring.v3.IServiceLevelObjective, protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|