IncidentServiceClient

IncidentServiceClient

The Incident API for Incident Response & Management.

Constructor

new IncidentServiceClient(optionsopt)

Construct an instance of IncidentServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. See the subsequent parameters for more details.

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

Members

(static) apiEndpoint

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

(static) port

The port for this API service.

(static) scopes

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

(static) servicePath

The DNS address for this API service.

Methods

annotationPath(project, incident, annotation) → {string}

Return a fully-qualified annotation resource name string.

Parameters:
Name Type Description
project string
incident string
annotation string

artifactPath(project, incident, artifact) → {string}

Return a fully-qualified artifact resource name string.

Parameters:
Name Type Description
project string
incident string
artifact string

cancelIncidentRoleHandover(request, optionsopt) → {Promise}

Cancels a role handover. This will fail if the 'proposed_assignee' field of the IncidentRoleAssignment is not equal to the 'new_assignee' field of the request.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the role assignment.

newAssignee google.cloud.irm.v1alpha2.User

Required. Person who was proposed as the next assignee (i.e. IncidentRoleAssignment.proposed_assignee) and whose proposal is being cancelled.

options object <optional>

Call options. See CallOptions for more details.

close()

Terminate the GRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

confirmIncidentRoleHandover(request, optionsopt) → {Promise}

Confirms a role handover. This will fail if the 'proposed_assignee' field of the IncidentRoleAssignment is not equal to the 'new_assignee' field of the request. If the caller is not the new_assignee, ForceIncidentRoleHandover should be used instead.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the role assignment.

newAssignee google.cloud.irm.v1alpha2.User

Required. The proposed assignee, who will now be the assignee. This should be the current user; otherwise ForceRoleHandover should be called.

options object <optional>

Call options. See CallOptions for more details.

createAnnotation(request, optionsopt) → {Promise}

Creates an annotation on an existing incident. Only 'text/plain' and 'text/markdown' annotations can be created via this method.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

annotation google.cloud.irm.v1alpha2.Annotation

Required. Only annotation.content is an input argument.

options object <optional>

Call options. See CallOptions for more details.

createArtifact(request, optionsopt) → {Promise}

Creates a new artifact.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

artifact google.cloud.irm.v1alpha2.Artifact

Required. The artifact to create.

options object <optional>

Call options. See CallOptions for more details.

createIncident(request, optionsopt) → {Promise}

Creates a new incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
incident google.cloud.irm.v1alpha2.Incident

Required. The incident to create.

parent string

Required. The resource name of the hosting Stackdriver project which the incident belongs to. The name is of the form projects/{project_id_or_number} .

options object <optional>

Call options. See CallOptions for more details.

createIncidentRoleAssignment(request, optionsopt) → {Promise}

Creates a role assignment on an existing incident. Normally, the user field will be set when assigning a role to oneself, and the next field will be set when proposing another user as the assignee. Setting the next field directly to a user other than oneself is equivalent to proposing and force-assigning the role to the user.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

incidentRoleAssignment google.cloud.irm.v1alpha2.IncidentRoleAssignment

Required. Role assignment to create.

options object <optional>

Call options. See CallOptions for more details.

createSignal(request, optionsopt) → {Promise}

Creates a new signal.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested signal belongs to.

signal google.cloud.irm.v1alpha2.Signal

Required. The signal to create.

options object <optional>

Call options. See CallOptions for more details.

createSubscription(request, optionsopt) → {Promise}

Creates a new subscription. This will fail if: a. there are too many (50) subscriptions in the incident already b. a subscription using the given channel already exists

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

subscription google.cloud.irm.v1alpha2.Subscription

Required. The subscription to create.

options object <optional>

Call options. See CallOptions for more details.

createTag(request, optionsopt) → {Promise}

Creates a tag on an existing incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

tag google.cloud.irm.v1alpha2.Tag

Required. Tag to create. Only tag.display_name is an input argument.

options object <optional>

Call options. See CallOptions for more details.

deleteArtifact(request, optionsopt) → {Promise}

Deletes an existing artifact.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the artifact.

options object <optional>

Call options. See CallOptions for more details.

deleteIncidentRoleAssignment(request, optionsopt) → {Promise}

Deletes an existing role assignment.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the role assignment.

options object <optional>

Call options. See CallOptions for more details.

deleteSubscription(request, optionsopt) → {Promise}

Deletes an existing subscription.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the subscription.

options object <optional>

Call options. See CallOptions for more details.

deleteTag(request, optionsopt) → {Promise}

Deletes an existing tag.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the tag.

options object <optional>

Call options. See CallOptions for more details.

escalateIncident(request, optionsopt) → {Promise}

Escalates an incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
incident google.cloud.irm.v1alpha2.Incident

Required. The incident to escalate with the new values.

updateMask google.protobuf.FieldMask

List of fields that should be updated.

subscriptions Array.<number>

Subscriptions to add or update. Existing subscriptions with the same channel and address as a subscription in the list will be updated.

tags Array.<number>

Tags to add. Tags identical to existing tags will be ignored.

roles Array.<number>

Roles to add or update. Existing roles with the same type (and title, for TYPE_OTHER roles) will be updated.

artifacts Array.<number>

Artifacts to add. All artifacts are added without checking for duplicates.

options object <optional>

Call options. See CallOptions for more details.

forceIncidentRoleHandover(request, optionsopt) → {Promise}

Forces a role handover. This will fail if the 'proposed_assignee' field of the IncidentRoleAssignment is not equal to the 'new_assignee' field of the request. If the caller is the new_assignee, ConfirmIncidentRoleHandover should be used instead.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the role assignment.

newAssignee google.cloud.irm.v1alpha2.User

Required. The proposed assignee, who will now be the assignee. This should not be the current user; otherwise ConfirmRoleHandover should be called.

options object <optional>

Call options. See CallOptions for more details.

getIncident(request, optionsopt) → {Promise}

Returns an incident by name.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

options object <optional>

Call options. See CallOptions for more details.

getProjectId(callback)

Return the project ID used by this class.

Parameters:
Name Type Description
callback function

the callback to be called with the current project Id.

getSignal(request, optionsopt) → {Promise}

Returns a signal by name.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the Signal resource, for example, "projects/{project_id_or_number}/signals/{signal_id}".

options object <optional>

Call options. See CallOptions for more details.

incidentPath(project, incident) → {string}

Return a fully-qualified incident resource name string.

Parameters:
Name Type Description
project string
incident string

incidentRoleAssignmentPath(project_id_or_number, incident_id, role_id) → {string}

Return a fully-qualified incidentRoleAssignment resource name string.

Parameters:
Name Type Description
project_id_or_number string
incident_id string
role_id string

initialize() → {Promise}

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.

listAnnotations(request, optionsopt) → {Promise}

Lists annotations that are part of an incident. No assumptions should be made on the content-type of the annotation returned.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of annotations to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listAnnotationsAsync(request, optionsopt) → {Object}

Equivalent to listAnnotations, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of annotations to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listAnnotationsStream(request, optionsopt) → {Stream}

Equivalent to listAnnotations, but returns a NodeJS Stream object.

This fetches the paged responses for listAnnotations continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of annotations to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

See:

listArtifacts(request, optionsopt) → {Promise}

Returns a list of artifacts for an incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of artifacts to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listArtifactsAsync(request, optionsopt) → {Object}

Equivalent to listArtifacts, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of artifacts to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listArtifactsStream(request, optionsopt) → {Stream}

Equivalent to listArtifacts, but returns a NodeJS Stream object.

This fetches the paged responses for listArtifacts continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of artifacts to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

See:

listIncidentRoleAssignments(request, optionsopt) → {Promise}

Lists role assignments that are part of an incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of assignments to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listIncidentRoleAssignmentsAsync(request, optionsopt) → {Object}

Equivalent to listIncidentRoleAssignments, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of assignments to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listIncidentRoleAssignmentsStream(request, optionsopt) → {Stream}

Equivalent to listIncidentRoleAssignments, but returns a NodeJS Stream object.

This fetches the paged responses for listIncidentRoleAssignments continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of assignments to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

See:

listSubscriptions(request, optionsopt) → {Promise}

Returns a list of subscriptions for an incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of subscriptions to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listSubscriptionsAsync(request, optionsopt) → {Object}

Equivalent to listSubscriptions, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of subscriptions to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listSubscriptionsStream(request, optionsopt) → {Stream}

Equivalent to listSubscriptions, but returns a NodeJS Stream object.

This fetches the paged responses for listSubscriptions continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of subscriptions to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

See:

listTags(request, optionsopt) → {Promise}

Lists tags that are part of an incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of tags to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listTagsAsync(request, optionsopt) → {Object}

Equivalent to listTags, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of tags to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

listTagsStream(request, optionsopt) → {Stream}

Equivalent to listTags, but returns a NodeJS Stream object.

This fetches the paged responses for listTags continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the incident, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of tags to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

options object <optional>

Call options. See CallOptions for more details.

See:

lookupSignal(request, optionsopt) → {Promise}

Finds a signal by other unique IDs.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
csccFinding string

Required. Full resource name of the CSCC finding id this signal refers to (e.g. "organizations/abc/sources/123/findings/xyz")

stackdriverNotificationId string

The ID from the Stackdriver Alerting notification.

options object <optional>

Call options. See CallOptions for more details.

matchAnnotationFromAnnotationName(annotationName) → {string}

Parse the annotation from Annotation resource.

Parameters:
Name Type Description
annotationName string

A fully-qualified path representing Annotation resource.

matchArtifactFromArtifactName(artifactName) → {string}

Parse the artifact from Artifact resource.

Parameters:
Name Type Description
artifactName string

A fully-qualified path representing Artifact resource.

matchIncidentFromAnnotationName(annotationName) → {string}

Parse the incident from Annotation resource.

Parameters:
Name Type Description
annotationName string

A fully-qualified path representing Annotation resource.

matchIncidentFromArtifactName(artifactName) → {string}

Parse the incident from Artifact resource.

Parameters:
Name Type Description
artifactName string

A fully-qualified path representing Artifact resource.

matchIncidentFromIncidentName(incidentName) → {string}

Parse the incident from Incident resource.

Parameters:
Name Type Description
incidentName string

A fully-qualified path representing Incident resource.

matchIncidentFromSubscriptionName(subscriptionName) → {string}

Parse the incident from Subscription resource.

Parameters:
Name Type Description
subscriptionName string

A fully-qualified path representing Subscription resource.

matchIncidentFromTagName(tagName) → {string}

Parse the incident from Tag resource.

Parameters:
Name Type Description
tagName string

A fully-qualified path representing Tag resource.

matchIncidentIdFromIncidentRoleAssignmentName(incidentRoleAssignmentName) → {string}

Parse the incident_id from IncidentRoleAssignment resource.

Parameters:
Name Type Description
incidentRoleAssignmentName string

A fully-qualified path representing IncidentRoleAssignment resource.

matchProjectFromAnnotationName(annotationName) → {string}

Parse the project from Annotation resource.

Parameters:
Name Type Description
annotationName string

A fully-qualified path representing Annotation resource.

matchProjectFromArtifactName(artifactName) → {string}

Parse the project from Artifact resource.

Parameters:
Name Type Description
artifactName string

A fully-qualified path representing Artifact resource.

matchProjectFromIncidentName(incidentName) → {string}

Parse the project from Incident resource.

Parameters:
Name Type Description
incidentName string

A fully-qualified path representing Incident resource.

matchProjectFromProjectName(projectName) → {string}

Parse the project from Project resource.

Parameters:
Name Type Description
projectName string

A fully-qualified path representing Project resource.

matchProjectFromSignalName(signalName) → {string}

Parse the project from Signal resource.

Parameters:
Name Type Description
signalName string

A fully-qualified path representing Signal resource.

matchProjectFromSubscriptionName(subscriptionName) → {string}

Parse the project from Subscription resource.

Parameters:
Name Type Description
subscriptionName string

A fully-qualified path representing Subscription resource.

matchProjectFromTagName(tagName) → {string}

Parse the project from Tag resource.

Parameters:
Name Type Description
tagName string

A fully-qualified path representing Tag resource.

matchProjectIdOrNumberFromIncidentRoleAssignmentName(incidentRoleAssignmentName) → {string}

Parse the project_id_or_number from IncidentRoleAssignment resource.

Parameters:
Name Type Description
incidentRoleAssignmentName string

A fully-qualified path representing IncidentRoleAssignment resource.

matchRoleIdFromIncidentRoleAssignmentName(incidentRoleAssignmentName) → {string}

Parse the role_id from IncidentRoleAssignment resource.

Parameters:
Name Type Description
incidentRoleAssignmentName string

A fully-qualified path representing IncidentRoleAssignment resource.

matchSignalFromSignalName(signalName) → {string}

Parse the signal from Signal resource.

Parameters:
Name Type Description
signalName string

A fully-qualified path representing Signal resource.

matchSubscriptionFromSubscriptionName(subscriptionName) → {string}

Parse the subscription from Subscription resource.

Parameters:
Name Type Description
subscriptionName string

A fully-qualified path representing Subscription resource.

matchTagFromTagName(tagName) → {string}

Parse the tag from Tag resource.

Parameters:
Name Type Description
tagName string

A fully-qualified path representing Tag resource.

projectPath(project) → {string}

Return a fully-qualified project resource name string.

Parameters:
Name Type Description
project string

requestIncidentRoleHandover(request, optionsopt) → {Promise}

Starts a role handover. The proposed assignee will receive an email notifying them of the assignment. This will fail if a role handover is already pending. Handover to an oncall ladder is not permitted. Use CreateIncidentRoleAssignment instead.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the role assignment.

newAssignee google.cloud.irm.v1alpha2.User

Required. The proposed assignee.

options object <optional>

Call options. See CallOptions for more details.

searchIncidents(request, optionsopt) → {Promise}

Returns a list of incidents. Incidents are ordered by start time, with the most recent incidents first.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested incidents belong to.

query string

An expression that defines which incidents to return.

Search atoms can be used to match certain specific fields. Otherwise, plain text will match text fields in the incident.

Search atoms:

  • start - (timestamp) The time the incident started.
  • stage - The stage of the incident, one of detected, triaged, mitigated, resolved, documented, or duplicate (which correspond to values in the Incident.Stage enum). These are ordered, so stage<resolved is equivalent to stage:detected OR stage:triaged OR stage:mitigated.
  • severity - (Incident.Severity) The severity of the incident.
    • Supports matching on a specific severity (for example, severity:major) or on a range (for example, severity>medium, severity<=minor, etc.).

Timestamp formats:

  • yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. In other words, the "<" operator will match dates before that date, the ">" operator will match dates after that date, and the ":" or "=" operators will match the entire day.
  • Nd (for example, 7d) - a relative number of days ago, treated as a moment in time (as opposed to a day-wide span). A multiple of 24 hours ago (as opposed to calendar days). In the case of daylight savings time, it will apply the current timezone to both ends of the range. Note that exact matching (for example, start:7d) is unlikely to be useful because that would only match incidents created precisely at a particular instant in time.

Examples:

  • foo - matches incidents containing the word "foo"
  • "foo bar" - matches incidents containing the phrase "foo bar"
  • foo bar or foo AND bar - matches incidents containing the words "foo" and "bar"
  • foo -bar or foo AND NOT bar - matches incidents containing the word "foo" but not the word "bar"
  • foo OR bar - matches incidents containing the word "foo" or the word "bar"
  • start>2018-11-28 - matches incidents which started after November 11, 2018.
  • start<=2018-11-28 - matches incidents which started on or before November 11, 2018.
  • start:2018-11-28 - matches incidents which started on November 11, 2018.
  • start>7d - matches incidents which started after the point in time 7*24 hours ago
  • start>180d - similar to 7d, but likely to cross the daylight savings time boundary, so the end time will be 1 hour different from "now."
  • foo AND start>90d AND stage<resolved - unresolved incidents from the past 90 days containing the word "foo"
pageSize number

Number of incidents to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

timeZone string

The time zone name. It should be an IANA TZ name, such as "America/Los_Angeles". For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If no time zone is specified, the default is UTC.

options object <optional>

Call options. See CallOptions for more details.

searchIncidentsAsync(request, optionsopt) → {Object}

Equivalent to searchIncidents, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested incidents belong to.

query string

An expression that defines which incidents to return.

Search atoms can be used to match certain specific fields. Otherwise, plain text will match text fields in the incident.

Search atoms:

  • start - (timestamp) The time the incident started.
  • stage - The stage of the incident, one of detected, triaged, mitigated, resolved, documented, or duplicate (which correspond to values in the Incident.Stage enum). These are ordered, so stage<resolved is equivalent to stage:detected OR stage:triaged OR stage:mitigated.
  • severity - (Incident.Severity) The severity of the incident.
    • Supports matching on a specific severity (for example, severity:major) or on a range (for example, severity>medium, severity<=minor, etc.).

Timestamp formats:

  • yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. In other words, the "<" operator will match dates before that date, the ">" operator will match dates after that date, and the ":" or "=" operators will match the entire day.
  • Nd (for example, 7d) - a relative number of days ago, treated as a moment in time (as opposed to a day-wide span). A multiple of 24 hours ago (as opposed to calendar days). In the case of daylight savings time, it will apply the current timezone to both ends of the range. Note that exact matching (for example, start:7d) is unlikely to be useful because that would only match incidents created precisely at a particular instant in time.

Examples:

  • foo - matches incidents containing the word "foo"
  • "foo bar" - matches incidents containing the phrase "foo bar"
  • foo bar or foo AND bar - matches incidents containing the words "foo" and "bar"
  • foo -bar or foo AND NOT bar - matches incidents containing the word "foo" but not the word "bar"
  • foo OR bar - matches incidents containing the word "foo" or the word "bar"
  • start>2018-11-28 - matches incidents which started after November 11, 2018.
  • start<=2018-11-28 - matches incidents which started on or before November 11, 2018.
  • start:2018-11-28 - matches incidents which started on November 11, 2018.
  • start>7d - matches incidents which started after the point in time 7*24 hours ago
  • start>180d - similar to 7d, but likely to cross the daylight savings time boundary, so the end time will be 1 hour different from "now."
  • foo AND start>90d AND stage<resolved - unresolved incidents from the past 90 days containing the word "foo"
pageSize number

Number of incidents to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

timeZone string

The time zone name. It should be an IANA TZ name, such as "America/Los_Angeles". For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If no time zone is specified, the default is UTC.

options object <optional>

Call options. See CallOptions for more details.

searchIncidentsStream(request, optionsopt) → {Stream}

Equivalent to searchIncidents, but returns a NodeJS Stream object.

This fetches the paged responses for searchIncidents continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested incidents belong to.

query string

An expression that defines which incidents to return.

Search atoms can be used to match certain specific fields. Otherwise, plain text will match text fields in the incident.

Search atoms:

  • start - (timestamp) The time the incident started.
  • stage - The stage of the incident, one of detected, triaged, mitigated, resolved, documented, or duplicate (which correspond to values in the Incident.Stage enum). These are ordered, so stage<resolved is equivalent to stage:detected OR stage:triaged OR stage:mitigated.
  • severity - (Incident.Severity) The severity of the incident.
    • Supports matching on a specific severity (for example, severity:major) or on a range (for example, severity>medium, severity<=minor, etc.).

Timestamp formats:

  • yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. In other words, the "<" operator will match dates before that date, the ">" operator will match dates after that date, and the ":" or "=" operators will match the entire day.
  • Nd (for example, 7d) - a relative number of days ago, treated as a moment in time (as opposed to a day-wide span). A multiple of 24 hours ago (as opposed to calendar days). In the case of daylight savings time, it will apply the current timezone to both ends of the range. Note that exact matching (for example, start:7d) is unlikely to be useful because that would only match incidents created precisely at a particular instant in time.

Examples:

  • foo - matches incidents containing the word "foo"
  • "foo bar" - matches incidents containing the phrase "foo bar"
  • foo bar or foo AND bar - matches incidents containing the words "foo" and "bar"
  • foo -bar or foo AND NOT bar - matches incidents containing the word "foo" but not the word "bar"
  • foo OR bar - matches incidents containing the word "foo" or the word "bar"
  • start>2018-11-28 - matches incidents which started after November 11, 2018.
  • start<=2018-11-28 - matches incidents which started on or before November 11, 2018.
  • start:2018-11-28 - matches incidents which started on November 11, 2018.
  • start>7d - matches incidents which started after the point in time 7*24 hours ago
  • start>180d - similar to 7d, but likely to cross the daylight savings time boundary, so the end time will be 1 hour different from "now."
  • foo AND start>90d AND stage<resolved - unresolved incidents from the past 90 days containing the word "foo"
pageSize number

Number of incidents to return.

pageToken string

Page token from an earlier query, as returned in next_page_token.

timeZone string

The time zone name. It should be an IANA TZ name, such as "America/Los_Angeles". For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If no time zone is specified, the default is UTC.

options object <optional>

Call options. See CallOptions for more details.

See:

searchSignals(request, optionsopt) → {Promise}

Lists signals that are part of an incident. Signals are returned in reverse chronological order. Note that search should not be relied on for critical functionality. It has lower availability guarantees and might fail to return valid results. Returned results might include stale or extraneous entries.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested incidents belong to.

query string

An expression that defines which signals to return.

Search atoms can be used to match certain specific fields. Otherwise, plain text will match text fields in the signal.

Search atoms:

  • start - (timestamp) The time the signal was created.
  • title - The title of the signal.
  • signal_state - open or closed. State of the signal. (e.g., signal_state:open)

Timestamp formats:

  • yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. In other words, the "<" operator will match dates before that date, the ">" operator will match dates after that date, and the ":" operator will match the entire day.
  • yyyy-MM-ddTHH:mm - Same as above, but with minute resolution.
  • yyyy-MM-ddTHH:mm:ss - Same as above, but with second resolution.
  • Nd (e.g. 7d) - a relative number of days ago, treated as a moment in time (as opposed to a day-wide span) a multiple of 24 hours ago (as opposed to calendar days). In the case of daylight savings time, it will apply the current timezone to both ends of the range. Note that exact matching (e.g. start:7d) is unlikely to be useful because that would only match signals created precisely at a particular instant in time.

The absolute timestamp formats (everything starting with a year) can optionally be followed with a UTC offset in +/-hh:mm format. Also, the 'T' separating dates and times can optionally be replaced with a space. Note that any timestamp containing a space or colon will need to be quoted.

Examples:

  • foo - matches signals containing the word "foo"
  • "foo bar" - matches signals containing the phrase "foo bar"
  • foo bar or foo AND bar - matches signals containing the words "foo" and "bar"
  • foo -bar or foo AND NOT bar - matches signals containing the word "foo" but not the word "bar"
  • foo OR bar - matches signals containing the word "foo" or the word "bar"
  • start>2018-11-28 - matches signals which started after November 11, 2018.
  • start<=2018-11-28 - matches signals which started on or before November 11, 2018.
  • start:2018-11-28 - matches signals which started on November 11, 2018.
  • start>"2018-11-28 01:02:03+04:00" - matches signals which started after November 11, 2018 at 1:02:03 AM according to the UTC+04 time zone.
  • start>7d - matches signals which started after the point in time 7*24 hours ago
  • start>180d - similar to 7d, but likely to cross the daylight savings time boundary, so the end time will be 1 hour different from "now."
  • foo AND start>90d AND stage<resolved - unresolved signals from the past 90 days containing the word "foo"
pageSize number

Maximum number of signals to return in the response.

pageToken string

Page token from an earlier query, as returned in next_page_token. All field values except for page_size and page_token should be the same as the original query (may return an error or unexpected data otherwise).

options object <optional>

Call options. See CallOptions for more details.

searchSignalsAsync(request, optionsopt) → {Object}

Equivalent to searchSignals, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested incidents belong to.

query string

An expression that defines which signals to return.

Search atoms can be used to match certain specific fields. Otherwise, plain text will match text fields in the signal.

Search atoms:

  • start - (timestamp) The time the signal was created.
  • title - The title of the signal.
  • signal_state - open or closed. State of the signal. (e.g., signal_state:open)

Timestamp formats:

  • yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. In other words, the "<" operator will match dates before that date, the ">" operator will match dates after that date, and the ":" operator will match the entire day.
  • yyyy-MM-ddTHH:mm - Same as above, but with minute resolution.
  • yyyy-MM-ddTHH:mm:ss - Same as above, but with second resolution.
  • Nd (e.g. 7d) - a relative number of days ago, treated as a moment in time (as opposed to a day-wide span) a multiple of 24 hours ago (as opposed to calendar days). In the case of daylight savings time, it will apply the current timezone to both ends of the range. Note that exact matching (e.g. start:7d) is unlikely to be useful because that would only match signals created precisely at a particular instant in time.

The absolute timestamp formats (everything starting with a year) can optionally be followed with a UTC offset in +/-hh:mm format. Also, the 'T' separating dates and times can optionally be replaced with a space. Note that any timestamp containing a space or colon will need to be quoted.

Examples:

  • foo - matches signals containing the word "foo"
  • "foo bar" - matches signals containing the phrase "foo bar"
  • foo bar or foo AND bar - matches signals containing the words "foo" and "bar"
  • foo -bar or foo AND NOT bar - matches signals containing the word "foo" but not the word "bar"
  • foo OR bar - matches signals containing the word "foo" or the word "bar"
  • start>2018-11-28 - matches signals which started after November 11, 2018.
  • start<=2018-11-28 - matches signals which started on or before November 11, 2018.
  • start:2018-11-28 - matches signals which started on November 11, 2018.
  • start>"2018-11-28 01:02:03+04:00" - matches signals which started after November 11, 2018 at 1:02:03 AM according to the UTC+04 time zone.
  • start>7d - matches signals which started after the point in time 7*24 hours ago
  • start>180d - similar to 7d, but likely to cross the daylight savings time boundary, so the end time will be 1 hour different from "now."
  • foo AND start>90d AND stage<resolved - unresolved signals from the past 90 days containing the word "foo"
pageSize number

Maximum number of signals to return in the response.

pageToken string

Page token from an earlier query, as returned in next_page_token. All field values except for page_size and page_token should be the same as the original query (may return an error or unexpected data otherwise).

options object <optional>

Call options. See CallOptions for more details.

searchSignalsStream(request, optionsopt) → {Stream}

Equivalent to searchSignals, but returns a NodeJS Stream object.

This fetches the paged responses for searchSignals continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the hosting Stackdriver project which requested incidents belong to.

query string

An expression that defines which signals to return.

Search atoms can be used to match certain specific fields. Otherwise, plain text will match text fields in the signal.

Search atoms:

  • start - (timestamp) The time the signal was created.
  • title - The title of the signal.
  • signal_state - open or closed. State of the signal. (e.g., signal_state:open)

Timestamp formats:

  • yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. In other words, the "<" operator will match dates before that date, the ">" operator will match dates after that date, and the ":" operator will match the entire day.
  • yyyy-MM-ddTHH:mm - Same as above, but with minute resolution.
  • yyyy-MM-ddTHH:mm:ss - Same as above, but with second resolution.
  • Nd (e.g. 7d) - a relative number of days ago, treated as a moment in time (as opposed to a day-wide span) a multiple of 24 hours ago (as opposed to calendar days). In the case of daylight savings time, it will apply the current timezone to both ends of the range. Note that exact matching (e.g. start:7d) is unlikely to be useful because that would only match signals created precisely at a particular instant in time.

The absolute timestamp formats (everything starting with a year) can optionally be followed with a UTC offset in +/-hh:mm format. Also, the 'T' separating dates and times can optionally be replaced with a space. Note that any timestamp containing a space or colon will need to be quoted.

Examples:

  • foo - matches signals containing the word "foo"
  • "foo bar" - matches signals containing the phrase "foo bar"
  • foo bar or foo AND bar - matches signals containing the words "foo" and "bar"
  • foo -bar or foo AND NOT bar - matches signals containing the word "foo" but not the word "bar"
  • foo OR bar - matches signals containing the word "foo" or the word "bar"
  • start>2018-11-28 - matches signals which started after November 11, 2018.
  • start<=2018-11-28 - matches signals which started on or before November 11, 2018.
  • start:2018-11-28 - matches signals which started on November 11, 2018.
  • start>"2018-11-28 01:02:03+04:00" - matches signals which started after November 11, 2018 at 1:02:03 AM according to the UTC+04 time zone.
  • start>7d - matches signals which started after the point in time 7*24 hours ago
  • start>180d - similar to 7d, but likely to cross the daylight savings time boundary, so the end time will be 1 hour different from "now."
  • foo AND start>90d AND stage<resolved - unresolved signals from the past 90 days containing the word "foo"
pageSize number

Maximum number of signals to return in the response.

pageToken string

Page token from an earlier query, as returned in next_page_token. All field values except for page_size and page_token should be the same as the original query (may return an error or unexpected data otherwise).

options object <optional>

Call options. See CallOptions for more details.

See:

searchSimilarIncidents(request, optionsopt) → {Promise}

Returns a list of incidents that are "similar" to the specified incident or signal. This functionality is provided on a best-effort basis and the definition of "similar" is subject to change.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the incident or signal, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of similar incidents to return.

pageToken string

Page token from an earlier query, as returned in 'next_page_token'.

options object <optional>

Call options. See CallOptions for more details.

searchSimilarIncidentsAsync(request, optionsopt) → {Object}

Equivalent to searchSimilarIncidents, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the incident or signal, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of similar incidents to return.

pageToken string

Page token from an earlier query, as returned in 'next_page_token'.

options object <optional>

Call options. See CallOptions for more details.

searchSimilarIncidentsStream(request, optionsopt) → {Stream}

Equivalent to searchSimilarIncidents, but returns a NodeJS Stream object.

This fetches the paged responses for searchSimilarIncidents continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the incident or signal, for example, "projects/{project_id_or_number}/incidents/{incident_id}".

pageSize number

Number of similar incidents to return.

pageToken string

Page token from an earlier query, as returned in 'next_page_token'.

options object <optional>

Call options. See CallOptions for more details.

See:

sendShiftHandoff(request, optionsopt) → {Promise}

Sends a summary of the shift for oncall handoff.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the Stackdriver project that the handoff is being sent from. for example, projects/{project_id_or_number}

recipients Array.<string>

Required. Email addresses of the recipients of the handoff, for example, "user@example.com". Must contain at least one entry.

cc Array.<string> <optional>

Optional. Email addresses that should be CC'd on the handoff.

subject string

Required. The subject of the email.

notesContentType string

Content type string, for example, 'text/plain' or 'text/html'.

notesContent string <optional>

Optional. Additional notes to be included in the handoff.

incidents Array.<number> <optional>

Optional. The set of incidents that should be included in the handoff.

previewOnly boolean

If set to true a ShiftHandoffResponse will be returned but the handoff will not actually be sent.

options object <optional>

Call options. See CallOptions for more details.

signalPath(project, signal) → {string}

Return a fully-qualified signal resource name string.

Parameters:
Name Type Description
project string
signal string

subscriptionPath(project, incident, subscription) → {string}

Return a fully-qualified subscription resource name string.

Parameters:
Name Type Description
project string
incident string
subscription string

tagPath(project, incident, tag) → {string}

Return a fully-qualified tag resource name string.

Parameters:
Name Type Description
project string
incident string
tag string

updateArtifact(request, optionsopt) → {Promise}

Updates an existing artifact.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
artifact google.cloud.irm.v1alpha2.Artifact

Required. The artifact to update with the new values.

updateMask google.protobuf.FieldMask

List of fields that should be updated.

options object <optional>

Call options. See CallOptions for more details.

updateIncident(request, optionsopt) → {Promise}

Updates an existing incident.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
incident google.cloud.irm.v1alpha2.Incident

Required. The incident to update with the new values.

updateMask google.protobuf.FieldMask

List of fields that should be updated.

options object <optional>

Call options. See CallOptions for more details.

updateSignal(request, optionsopt) → {Promise}

Updates an existing signal (for example, to assign/unassign it to an incident).

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
signal google.cloud.irm.v1alpha2.Signal

Required. The signal to update with the new values.

updateMask google.protobuf.FieldMask

List of fields that should be updated.

options object <optional>

Call options. See CallOptions for more details.

updateSubscription(request, optionsopt) → {Promise}

Updates a subscription.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
subscription google.cloud.irm.v1alpha2.Subscription

Required. The subscription to update, with new values.

updateMask google.protobuf.FieldMask

List of fields that should be updated.

options object <optional>

Call options. See CallOptions for more details.