The AlertPolicyService API is used to manage (list, create, delete, edit) alert policies in Cloud Monitoring. An alerting policy is a description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. In addition to using this API, alert policies can also be managed through [Cloud Monitoring](https://cloud.google.com/monitoring/docs/), which can be reached by clicking the "Monitoring" tab in [Cloud console](https://console.cloud.google.com/). v3
Package
@google-cloud/monitoringConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of AlertPolicyServiceClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
alertPolicyServiceStub
alertPolicyServiceStub?: Promise<{
[name: string]: Function;
}>;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.
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. |
createAlertPolicy(request, options)
createAlertPolicy(request?: protos.google.monitoring.v3.ICreateAlertPolicyRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IAlertPolicy,
protos.google.monitoring.v3.ICreateAlertPolicyRequest | undefined,
{} | undefined
]>;Creates a new alerting policy.
Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAlertPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IAlertPolicy,
protos.google.monitoring.v3.ICreateAlertPolicyRequest | 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
* project (https://cloud.google.com/monitoring/api/v3#project_name) in which
* to create the alerting policy. The format is:
* projects/[PROJECT_ID_OR_NUMBER]
* Note that this field names the parent container in which the alerting
* policy will be written, not the name of the created policy. |name| must be
* a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will
* return. The alerting policy that is returned will have a name that contains
* a normalized representation of this name as a prefix but adds a suffix of
* the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
* container.
*/
// const name = 'abc123'
/**
* Required. The requested alerting policy. You should omit the `name` field
* in this policy. The name will be returned in the new policy, including a
* new `[ALERT_POLICY_ID]` value.
*/
// const alertPolicy = {}
// Imports the Monitoring library
const {AlertPolicyServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new AlertPolicyServiceClient();
async function callCreateAlertPolicy() {
// Construct request
const request = {
name,
alertPolicy,
};
// Run request
const response = await monitoringClient.createAlertPolicy(request);
console.log(response);
}
callCreateAlertPolicy();
createAlertPolicy(request, options, callback)
createAlertPolicy(request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAlertPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createAlertPolicy(request, callback)
createAlertPolicy(request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, callback: Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAlertPolicyRequest
|
callback |
Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAlertPolicy(request, options)
deleteAlertPolicy(request?: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined,
{} | undefined
]>;Deletes an alerting policy.
Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAlertPolicyRequest
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.IDeleteAlertPolicyRequest | 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. The alerting policy to delete. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
* For more information, see AlertPolicy google.monitoring.v3.AlertPolicy.
*/
// const name = 'abc123'
// Imports the Monitoring library
const {AlertPolicyServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new AlertPolicyServiceClient();
async function callDeleteAlertPolicy() {
// Construct request
const request = {
name,
};
// Run request
const response = await monitoringClient.deleteAlertPolicy(request);
console.log(response);
}
callDeleteAlertPolicy();
deleteAlertPolicy(request, options, callback)
deleteAlertPolicy(request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAlertPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAlertPolicy(request, callback)
deleteAlertPolicy(request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAlertPolicyRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteAlertPolicyRequest | 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. |
getAlertPolicy(request, options)
getAlertPolicy(request?: protos.google.monitoring.v3.IGetAlertPolicyRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IAlertPolicy,
protos.google.monitoring.v3.IGetAlertPolicyRequest | undefined,
{} | undefined
]>;Gets a single alerting policy.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetAlertPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IAlertPolicy,
protos.google.monitoring.v3.IGetAlertPolicyRequest | 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 alerting policy to retrieve. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
*/
// const name = 'abc123'
// Imports the Monitoring library
const {AlertPolicyServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new AlertPolicyServiceClient();
async function callGetAlertPolicy() {
// Construct request
const request = {
name,
};
// Run request
const response = await monitoringClient.getAlertPolicy(request);
console.log(response);
}
callGetAlertPolicy();
getAlertPolicy(request, options, callback)
getAlertPolicy(request: protos.google.monitoring.v3.IGetAlertPolicyRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAlertPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAlertPolicy(request, callback)
getAlertPolicy(request: protos.google.monitoring.v3.IGetAlertPolicyRequest, callback: Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAlertPolicyRequest
|
callback |
Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
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 |
|
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. |
listAlertPolicies(request, options)
listAlertPolicies(request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IAlertPolicy[],
protos.google.monitoring.v3.IListAlertPoliciesRequest | null,
protos.google.monitoring.v3.IListAlertPoliciesResponse
]>;Lists the existing alerting policies for the workspace.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAlertPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IAlertPolicy[],
protos.google.monitoring.v3.IListAlertPoliciesRequest | null,
protos.google.monitoring.v3.IListAlertPoliciesResponse
]> |
{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 |
listAlertPolicies(request, options, callback)
listAlertPolicies(request: protos.google.monitoring.v3.IListAlertPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.monitoring.v3.IListAlertPoliciesRequest, protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, protos.google.monitoring.v3.IAlertPolicy>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAlertPoliciesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.monitoring.v3.IListAlertPoliciesRequest, protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, protos.google.monitoring.v3.IAlertPolicy>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAlertPolicies(request, callback)
listAlertPolicies(request: protos.google.monitoring.v3.IListAlertPoliciesRequest, callback: PaginationCallback<protos.google.monitoring.v3.IListAlertPoliciesRequest, protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, protos.google.monitoring.v3.IAlertPolicy>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAlertPoliciesRequest
|
callback |
PaginationCallback<protos.google.monitoring.v3.IListAlertPoliciesRequest, protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, protos.google.monitoring.v3.IAlertPolicy>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAlertPoliciesAsync(request, options)
listAlertPoliciesAsync(request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.monitoring.v3.IAlertPolicy>;Equivalent to listAlertPolicies, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAlertPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.monitoring.v3.IAlertPolicy> |
{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. The
* project (https://cloud.google.com/monitoring/api/v3#project_name) whose
* alert policies are to be listed. The format is:
* projects/[PROJECT_ID_OR_NUMBER]
* Note that this field names the parent container in which the alerting
* policies to be listed are stored. To retrieve a single alerting policy
* by name, use the
* GetAlertPolicy google.monitoring.v3.AlertPolicyService.GetAlertPolicy
* operation, instead.
*/
// const name = 'abc123'
/**
* Optional. If provided, this field specifies the criteria that must be met
* by alert policies to be included in the response.
* For more details, see sorting and
* filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
*/
// const filter = 'abc123'
/**
* Optional. A comma-separated list of fields by which to sort the result.
* Supports the same set of field references as the `filter` field. Entries
* can be prefixed with a minus sign to sort by the field in descending order.
* For more details, see sorting and
* filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
*/
// const orderBy = 'abc123'
/**
* Optional. The maximum number of results to return in a single response.
*/
// const pageSize = 1234
/**
* Optional. 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 more results from the previous
* method call.
*/
// const pageToken = 'abc123'
// Imports the Monitoring library
const {AlertPolicyServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new AlertPolicyServiceClient();
async function callListAlertPolicies() {
// Construct request
const request = {
name,
};
// Run request
const iterable = monitoringClient.listAlertPoliciesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAlertPolicies();
listAlertPoliciesStream(request, options)
listAlertPoliciesStream(request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, options?: CallOptions): Transform;Equivalent to listAlertPolicies, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAlertPoliciesRequest
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. |
updateAlertPolicy(request, options)
updateAlertPolicy(request?: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IAlertPolicy,
protos.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined,
{} | undefined
]>;Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.
Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAlertPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.monitoring.v3.IAlertPolicy,
protos.google.monitoring.v3.IUpdateAlertPolicyRequest | 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.
*/
/**
* Optional. A list of alerting policy field names. If this field is not
* empty, each listed field in the existing alerting policy is set to the
* value of the corresponding field in the supplied policy (`alert_policy`),
* or to the field's default value if the field is not in the supplied
* alerting policy. Fields not listed retain their previous value.
* Examples of valid field masks include `display_name`, `documentation`,
* `documentation.content`, `documentation.mime_type`, `user_labels`,
* `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.
* If this field is empty, then the supplied alerting policy replaces the
* existing policy. It is the same as deleting the existing policy and
* adding the supplied policy, except for the following:
* + The new policy will have the same `[ALERT_POLICY_ID]` as the former
* policy. This gives you continuity with the former policy in your
* notifications and incidents.
* + Conditions in the new policy will keep their former `[CONDITION_ID]` if
* the supplied condition includes the `name` field with that
* `[CONDITION_ID]`. If the supplied condition omits the `name` field,
* then a new `[CONDITION_ID]` is created.
*/
// const updateMask = {}
/**
* Required. The updated alerting policy or the updated values for the
* fields listed in `update_mask`.
* If `update_mask` is not empty, any fields in this policy that are
* not in `update_mask` are ignored.
*/
// const alertPolicy = {}
// Imports the Monitoring library
const {AlertPolicyServiceClient} = require('@google-cloud/monitoring').v3;
// Instantiates a client
const monitoringClient = new AlertPolicyServiceClient();
async function callUpdateAlertPolicy() {
// Construct request
const request = {
alertPolicy,
};
// Run request
const response = await monitoringClient.updateAlertPolicy(request);
console.log(response);
}
callUpdateAlertPolicy();
updateAlertPolicy(request, options, callback)
updateAlertPolicy(request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAlertPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateAlertPolicy(request, callback)
updateAlertPolicy(request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, callback: Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAlertPolicyRequest
|
callback |
Callback<protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|