package irm
import "cloud.google.com/go/irm/apiv1alpha2"
Package irm is an auto-generated package for the Stackdriver Incident Response & Management API.
NOTE: This package is in alpha. It is not stable, and is likely to change.
Index ¶
- func DefaultAuthScopes() []string
- type AnnotationIterator
- func (it *AnnotationIterator) Next() (*irmpb.Annotation, error)
- func (it *AnnotationIterator) PageInfo() *iterator.PageInfo
- type ArtifactIterator
- func (it *ArtifactIterator) Next() (*irmpb.Artifact, error)
- func (it *ArtifactIterator) PageInfo() *iterator.PageInfo
- type IncidentCallOptions
- type IncidentClient
- func NewIncidentClient(ctx context.Context, opts ...option.ClientOption) (*IncidentClient, error)
- func (c *IncidentClient) CancelIncidentRoleHandover(ctx context.Context, req *irmpb.CancelIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) Close() error
- func (c *IncidentClient) ConfirmIncidentRoleHandover(ctx context.Context, req *irmpb.ConfirmIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) Connection() *grpc.ClientConn
- func (c *IncidentClient) CreateAnnotation(ctx context.Context, req *irmpb.CreateAnnotationRequest, opts ...gax.CallOption) (*irmpb.Annotation, error)
- func (c *IncidentClient) CreateArtifact(ctx context.Context, req *irmpb.CreateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)
- func (c *IncidentClient) CreateIncident(ctx context.Context, req *irmpb.CreateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
- func (c *IncidentClient) CreateIncidentRoleAssignment(ctx context.Context, req *irmpb.CreateIncidentRoleAssignmentRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) CreateSignal(ctx context.Context, req *irmpb.CreateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
- func (c *IncidentClient) CreateSubscription(ctx context.Context, req *irmpb.CreateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)
- func (c *IncidentClient) CreateTag(ctx context.Context, req *irmpb.CreateTagRequest, opts ...gax.CallOption) (*irmpb.Tag, error)
- func (c *IncidentClient) DeleteArtifact(ctx context.Context, req *irmpb.DeleteArtifactRequest, opts ...gax.CallOption) error
- func (c *IncidentClient) DeleteIncidentRoleAssignment(ctx context.Context, req *irmpb.DeleteIncidentRoleAssignmentRequest, opts ...gax.CallOption) error
- func (c *IncidentClient) DeleteSubscription(ctx context.Context, req *irmpb.DeleteSubscriptionRequest, opts ...gax.CallOption) error
- func (c *IncidentClient) DeleteTag(ctx context.Context, req *irmpb.DeleteTagRequest, opts ...gax.CallOption) error
- func (c *IncidentClient) EscalateIncident(ctx context.Context, req *irmpb.EscalateIncidentRequest, opts ...gax.CallOption) (*irmpb.EscalateIncidentResponse, error)
- func (c *IncidentClient) ForceIncidentRoleHandover(ctx context.Context, req *irmpb.ForceIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) GetIncident(ctx context.Context, req *irmpb.GetIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
- func (c *IncidentClient) GetSignal(ctx context.Context, req *irmpb.GetSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
- func (c *IncidentClient) ListAnnotations(ctx context.Context, req *irmpb.ListAnnotationsRequest, opts ...gax.CallOption) *AnnotationIterator
- func (c *IncidentClient) ListArtifacts(ctx context.Context, req *irmpb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator
- func (c *IncidentClient) ListIncidentRoleAssignments(ctx context.Context, req *irmpb.ListIncidentRoleAssignmentsRequest, opts ...gax.CallOption) *IncidentRoleAssignmentIterator
- func (c *IncidentClient) ListSubscriptions(ctx context.Context, req *irmpb.ListSubscriptionsRequest, opts ...gax.CallOption) *SubscriptionIterator
- func (c *IncidentClient) ListTags(ctx context.Context, req *irmpb.ListTagsRequest, opts ...gax.CallOption) *TagIterator
- func (c *IncidentClient) RequestIncidentRoleHandover(ctx context.Context, req *irmpb.RequestIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) SearchIncidents(ctx context.Context, req *irmpb.SearchIncidentsRequest, opts ...gax.CallOption) *IncidentIterator
- func (c *IncidentClient) SearchSignals(ctx context.Context, req *irmpb.SearchSignalsRequest, opts ...gax.CallOption) *SignalIterator
- func (c *IncidentClient) SearchSimilarIncidents(ctx context.Context, req *irmpb.SearchSimilarIncidentsRequest, opts ...gax.CallOption) *SearchSimilarIncidentsResponse_ResultIterator
- func (c *IncidentClient) SendShiftHandoff(ctx context.Context, req *irmpb.SendShiftHandoffRequest, opts ...gax.CallOption) (*irmpb.SendShiftHandoffResponse, error)
- func (c *IncidentClient) UpdateArtifact(ctx context.Context, req *irmpb.UpdateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)
- func (c *IncidentClient) UpdateIncident(ctx context.Context, req *irmpb.UpdateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
- func (c *IncidentClient) UpdateSignal(ctx context.Context, req *irmpb.UpdateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
- func (c *IncidentClient) UpdateSubscription(ctx context.Context, req *irmpb.UpdateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)
- type IncidentIterator
- func (it *IncidentIterator) Next() (*irmpb.Incident, error)
- func (it *IncidentIterator) PageInfo() *iterator.PageInfo
- type IncidentRoleAssignmentIterator
- func (it *IncidentRoleAssignmentIterator) Next() (*irmpb.IncidentRoleAssignment, error)
- func (it *IncidentRoleAssignmentIterator) PageInfo() *iterator.PageInfo
- type SearchSimilarIncidentsResponse_ResultIterator
- func (it *SearchSimilarIncidentsResponse_ResultIterator) Next() (*irmpb.SearchSimilarIncidentsResponse_Result, error)
- func (it *SearchSimilarIncidentsResponse_ResultIterator) PageInfo() *iterator.PageInfo
- type SignalIterator
- func (it *SignalIterator) Next() (*irmpb.Signal, error)
- func (it *SignalIterator) PageInfo() *iterator.PageInfo
- type SubscriptionIterator
- func (it *SubscriptionIterator) Next() (*irmpb.Subscription, error)
- func (it *SubscriptionIterator) PageInfo() *iterator.PageInfo
- type TagIterator
Examples ¶
- IncidentClient.CancelIncidentRoleHandover
- IncidentClient.ConfirmIncidentRoleHandover
- IncidentClient.CreateAnnotation
- IncidentClient.CreateArtifact
- IncidentClient.CreateIncident
- IncidentClient.CreateIncidentRoleAssignment
- IncidentClient.CreateSignal
- IncidentClient.CreateSubscription
- IncidentClient.CreateTag
- IncidentClient.DeleteArtifact
- IncidentClient.DeleteIncidentRoleAssignment
- IncidentClient.DeleteSubscription
- IncidentClient.DeleteTag
- IncidentClient.EscalateIncident
- IncidentClient.ForceIncidentRoleHandover
- IncidentClient.GetIncident
- IncidentClient.GetSignal
- IncidentClient.ListAnnotations
- IncidentClient.ListArtifacts
- IncidentClient.ListIncidentRoleAssignments
- IncidentClient.ListSubscriptions
- IncidentClient.ListTags
- IncidentClient.RequestIncidentRoleHandover
- IncidentClient.SearchIncidents
- IncidentClient.SearchSignals
- IncidentClient.SearchSimilarIncidents
- IncidentClient.SendShiftHandoff
- IncidentClient.UpdateArtifact
- IncidentClient.UpdateIncident
- IncidentClient.UpdateSignal
- IncidentClient.UpdateSubscription
- NewIncidentClient
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AnnotationIterator ¶
type AnnotationIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.Annotation, nextPageToken string, err error) // contains filtered or unexported fields }
AnnotationIterator manages a stream of *irmpb.Annotation.
func (*AnnotationIterator) Next ¶
func (it *AnnotationIterator) Next() (*irmpb.Annotation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AnnotationIterator) PageInfo ¶
func (it *AnnotationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ArtifactIterator ¶
type ArtifactIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.Artifact, nextPageToken string, err error) // contains filtered or unexported fields }
ArtifactIterator manages a stream of *irmpb.Artifact.
func (*ArtifactIterator) Next ¶
func (it *ArtifactIterator) Next() (*irmpb.Artifact, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ArtifactIterator) PageInfo ¶
func (it *ArtifactIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IncidentCallOptions ¶
type IncidentCallOptions struct { CreateIncident []gax.CallOption GetIncident []gax.CallOption SearchIncidents []gax.CallOption UpdateIncident []gax.CallOption SearchSimilarIncidents []gax.CallOption CreateAnnotation []gax.CallOption ListAnnotations []gax.CallOption CreateTag []gax.CallOption DeleteTag []gax.CallOption ListTags []gax.CallOption CreateSignal []gax.CallOption SearchSignals []gax.CallOption GetSignal []gax.CallOption UpdateSignal []gax.CallOption EscalateIncident []gax.CallOption CreateArtifact []gax.CallOption ListArtifacts []gax.CallOption UpdateArtifact []gax.CallOption DeleteArtifact []gax.CallOption SendShiftHandoff []gax.CallOption CreateSubscription []gax.CallOption UpdateSubscription []gax.CallOption ListSubscriptions []gax.CallOption DeleteSubscription []gax.CallOption CreateIncidentRoleAssignment []gax.CallOption DeleteIncidentRoleAssignment []gax.CallOption ListIncidentRoleAssignments []gax.CallOption RequestIncidentRoleHandover []gax.CallOption ConfirmIncidentRoleHandover []gax.CallOption ForceIncidentRoleHandover []gax.CallOption CancelIncidentRoleHandover []gax.CallOption }
IncidentCallOptions contains the retry settings for each method of IncidentClient.
type IncidentClient ¶
type IncidentClient struct { // The call options for this service. CallOptions *IncidentCallOptions // contains filtered or unexported fields }
IncidentClient is a client for interacting with Stackdriver Incident Response & Management API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
func NewIncidentClient ¶
func NewIncidentClient(ctx context.Context, opts ...option.ClientOption) (*IncidentClient, error)
NewIncidentClient creates a new incident service client.
The Incident API for Incident Response & Management.
func (*IncidentClient) CancelIncidentRoleHandover ¶
func (c *IncidentClient) CancelIncidentRoleHandover(ctx context.Context, req *irmpb.CancelIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
CancelIncidentRoleHandover 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.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CancelIncidentRoleHandoverRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CancelIncidentRoleHandover(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) Close ¶
func (c *IncidentClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*IncidentClient) ConfirmIncidentRoleHandover ¶
func (c *IncidentClient) ConfirmIncidentRoleHandover(ctx context.Context, req *irmpb.ConfirmIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
ConfirmIncidentRoleHandover 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.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ConfirmIncidentRoleHandoverRequest{
// TODO: Fill request struct fields.
}
resp, err := c.ConfirmIncidentRoleHandover(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) Connection ¶
func (c *IncidentClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*IncidentClient) CreateAnnotation ¶
func (c *IncidentClient) CreateAnnotation(ctx context.Context, req *irmpb.CreateAnnotationRequest, opts ...gax.CallOption) (*irmpb.Annotation, error)
CreateAnnotation creates an annotation on an existing incident. Only 'text/plain' and
'text/markdown' annotations can be created via this method.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateAnnotationRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateAnnotation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) CreateArtifact ¶
func (c *IncidentClient) CreateArtifact(ctx context.Context, req *irmpb.CreateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)
CreateArtifact creates a new artifact.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateArtifactRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateArtifact(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) CreateIncident ¶
func (c *IncidentClient) CreateIncident(ctx context.Context, req *irmpb.CreateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
CreateIncident creates a new incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateIncidentRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateIncident(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) CreateIncidentRoleAssignment ¶
func (c *IncidentClient) CreateIncidentRoleAssignment(ctx context.Context, req *irmpb.CreateIncidentRoleAssignmentRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
CreateIncidentRoleAssignment 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.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateIncidentRoleAssignmentRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateIncidentRoleAssignment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) CreateSignal ¶
func (c *IncidentClient) CreateSignal(ctx context.Context, req *irmpb.CreateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
CreateSignal creates a new signal.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateSignalRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateSignal(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) CreateSubscription ¶
func (c *IncidentClient) CreateSubscription(ctx context.Context, req *irmpb.CreateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)
CreateSubscription 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
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateSubscriptionRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateSubscription(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) CreateTag ¶
func (c *IncidentClient) CreateTag(ctx context.Context, req *irmpb.CreateTagRequest, opts ...gax.CallOption) (*irmpb.Tag, error)
CreateTag creates a tag on an existing incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.CreateTagRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) DeleteArtifact ¶
func (c *IncidentClient) DeleteArtifact(ctx context.Context, req *irmpb.DeleteArtifactRequest, opts ...gax.CallOption) error
DeleteArtifact deletes an existing artifact.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.DeleteArtifactRequest{
// TODO: Fill request struct fields.
}
err = c.DeleteArtifact(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*IncidentClient) DeleteIncidentRoleAssignment ¶
func (c *IncidentClient) DeleteIncidentRoleAssignment(ctx context.Context, req *irmpb.DeleteIncidentRoleAssignmentRequest, opts ...gax.CallOption) error
DeleteIncidentRoleAssignment deletes an existing role assignment.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.DeleteIncidentRoleAssignmentRequest{
// TODO: Fill request struct fields.
}
err = c.DeleteIncidentRoleAssignment(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*IncidentClient) DeleteSubscription ¶
func (c *IncidentClient) DeleteSubscription(ctx context.Context, req *irmpb.DeleteSubscriptionRequest, opts ...gax.CallOption) error
DeleteSubscription deletes an existing subscription.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.DeleteSubscriptionRequest{
// TODO: Fill request struct fields.
}
err = c.DeleteSubscription(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*IncidentClient) DeleteTag ¶
func (c *IncidentClient) DeleteTag(ctx context.Context, req *irmpb.DeleteTagRequest, opts ...gax.CallOption) error
DeleteTag deletes an existing tag.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.DeleteTagRequest{
// TODO: Fill request struct fields.
}
err = c.DeleteTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*IncidentClient) EscalateIncident ¶
func (c *IncidentClient) EscalateIncident(ctx context.Context, req *irmpb.EscalateIncidentRequest, opts ...gax.CallOption) (*irmpb.EscalateIncidentResponse, error)
EscalateIncident escalates an incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.EscalateIncidentRequest{
// TODO: Fill request struct fields.
}
resp, err := c.EscalateIncident(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) ForceIncidentRoleHandover ¶
func (c *IncidentClient) ForceIncidentRoleHandover(ctx context.Context, req *irmpb.ForceIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
ForceIncidentRoleHandover 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.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ForceIncidentRoleHandoverRequest{
// TODO: Fill request struct fields.
}
resp, err := c.ForceIncidentRoleHandover(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) GetIncident ¶
func (c *IncidentClient) GetIncident(ctx context.Context, req *irmpb.GetIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
GetIncident returns an incident by name.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.GetIncidentRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetIncident(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) GetSignal ¶
func (c *IncidentClient) GetSignal(ctx context.Context, req *irmpb.GetSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
GetSignal returns a signal by name.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.GetSignalRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetSignal(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) ListAnnotations ¶
func (c *IncidentClient) ListAnnotations(ctx context.Context, req *irmpb.ListAnnotationsRequest, opts ...gax.CallOption) *AnnotationIterator
ListAnnotations lists annotations that are part of an incident. No assumptions should be
made on the content-type of the annotation returned.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ListAnnotationsRequest{
// TODO: Fill request struct fields.
}
it := c.ListAnnotations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) ListArtifacts ¶
func (c *IncidentClient) ListArtifacts(ctx context.Context, req *irmpb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator
ListArtifacts returns a list of artifacts for an incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ListArtifactsRequest{
// TODO: Fill request struct fields.
}
it := c.ListArtifacts(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) ListIncidentRoleAssignments ¶
func (c *IncidentClient) ListIncidentRoleAssignments(ctx context.Context, req *irmpb.ListIncidentRoleAssignmentsRequest, opts ...gax.CallOption) *IncidentRoleAssignmentIterator
ListIncidentRoleAssignments lists role assignments that are part of an incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ListIncidentRoleAssignmentsRequest{
// TODO: Fill request struct fields.
}
it := c.ListIncidentRoleAssignments(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) ListSubscriptions ¶
func (c *IncidentClient) ListSubscriptions(ctx context.Context, req *irmpb.ListSubscriptionsRequest, opts ...gax.CallOption) *SubscriptionIterator
ListSubscriptions returns a list of subscriptions for an incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ListSubscriptionsRequest{
// TODO: Fill request struct fields.
}
it := c.ListSubscriptions(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) ListTags ¶
func (c *IncidentClient) ListTags(ctx context.Context, req *irmpb.ListTagsRequest, opts ...gax.CallOption) *TagIterator
ListTags lists tags that are part of an incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.ListTagsRequest{
// TODO: Fill request struct fields.
}
it := c.ListTags(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) RequestIncidentRoleHandover ¶
func (c *IncidentClient) RequestIncidentRoleHandover(ctx context.Context, req *irmpb.RequestIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)
RequestIncidentRoleHandover 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.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.RequestIncidentRoleHandoverRequest{
// TODO: Fill request struct fields.
}
resp, err := c.RequestIncidentRoleHandover(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) SearchIncidents ¶
func (c *IncidentClient) SearchIncidents(ctx context.Context, req *irmpb.SearchIncidentsRequest, opts ...gax.CallOption) *IncidentIterator
SearchIncidents returns a list of incidents.
Incidents are ordered by start time, with the most recent incidents first.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.SearchIncidentsRequest{
// TODO: Fill request struct fields.
}
it := c.SearchIncidents(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) SearchSignals ¶
func (c *IncidentClient) SearchSignals(ctx context.Context, req *irmpb.SearchSignalsRequest, opts ...gax.CallOption) *SignalIterator
SearchSignals lists signals that are part of an incident.
Signals are returned in reverse chronological order.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.SearchSignalsRequest{
// TODO: Fill request struct fields.
}
it := c.SearchSignals(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) SearchSimilarIncidents ¶
func (c *IncidentClient) SearchSimilarIncidents(ctx context.Context, req *irmpb.SearchSimilarIncidentsRequest, opts ...gax.CallOption) *SearchSimilarIncidentsResponse_ResultIterator
SearchSimilarIncidents 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.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
"google.golang.org/api/iterator"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.SearchSimilarIncidentsRequest{
// TODO: Fill request struct fields.
}
it := c.SearchSimilarIncidents(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*IncidentClient) SendShiftHandoff ¶
func (c *IncidentClient) SendShiftHandoff(ctx context.Context, req *irmpb.SendShiftHandoffRequest, opts ...gax.CallOption) (*irmpb.SendShiftHandoffResponse, error)
SendShiftHandoff sends a summary of the shift for oncall handoff.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.SendShiftHandoffRequest{
// TODO: Fill request struct fields.
}
resp, err := c.SendShiftHandoff(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) UpdateArtifact ¶
func (c *IncidentClient) UpdateArtifact(ctx context.Context, req *irmpb.UpdateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)
UpdateArtifact updates an existing artifact.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.UpdateArtifactRequest{
// TODO: Fill request struct fields.
}
resp, err := c.UpdateArtifact(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) UpdateIncident ¶
func (c *IncidentClient) UpdateIncident(ctx context.Context, req *irmpb.UpdateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
UpdateIncident updates an existing incident.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.UpdateIncidentRequest{
// TODO: Fill request struct fields.
}
resp, err := c.UpdateIncident(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) UpdateSignal ¶
func (c *IncidentClient) UpdateSignal(ctx context.Context, req *irmpb.UpdateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
UpdateSignal updates an existing signal (for example, to assign/unassign it to an
incident).
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.UpdateSignalRequest{
// TODO: Fill request struct fields.
}
resp, err := c.UpdateSignal(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*IncidentClient) UpdateSubscription ¶
func (c *IncidentClient) UpdateSubscription(ctx context.Context, req *irmpb.UpdateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)
UpdateSubscription updates a subscription.
Code:play
Example¶
package main
import (
"context"
irm "cloud.google.com/go/irm/apiv1alpha2"
irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)
func main() {
ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &irmpb.UpdateSubscriptionRequest{
// TODO: Fill request struct fields.
}
resp, err := c.UpdateSubscription(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
type IncidentIterator ¶
type IncidentIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.Incident, nextPageToken string, err error) // contains filtered or unexported fields }
IncidentIterator manages a stream of *irmpb.Incident.
func (*IncidentIterator) Next ¶
func (it *IncidentIterator) Next() (*irmpb.Incident, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*IncidentIterator) PageInfo ¶
func (it *IncidentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IncidentRoleAssignmentIterator ¶
type IncidentRoleAssignmentIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.IncidentRoleAssignment, nextPageToken string, err error) // contains filtered or unexported fields }
IncidentRoleAssignmentIterator manages a stream of *irmpb.IncidentRoleAssignment.
func (*IncidentRoleAssignmentIterator) Next ¶
func (it *IncidentRoleAssignmentIterator) Next() (*irmpb.IncidentRoleAssignment, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*IncidentRoleAssignmentIterator) PageInfo ¶
func (it *IncidentRoleAssignmentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SearchSimilarIncidentsResponse_ResultIterator ¶
type SearchSimilarIncidentsResponse_ResultIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.SearchSimilarIncidentsResponse_Result, nextPageToken string, err error) // contains filtered or unexported fields }
SearchSimilarIncidentsResponse_ResultIterator manages a stream of *irmpb.SearchSimilarIncidentsResponse_Result.
func (*SearchSimilarIncidentsResponse_ResultIterator) Next ¶
func (it *SearchSimilarIncidentsResponse_ResultIterator) Next() (*irmpb.SearchSimilarIncidentsResponse_Result, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*SearchSimilarIncidentsResponse_ResultIterator) PageInfo ¶
func (it *SearchSimilarIncidentsResponse_ResultIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SignalIterator ¶
type SignalIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.Signal, nextPageToken string, err error) // contains filtered or unexported fields }
SignalIterator manages a stream of *irmpb.Signal.
func (*SignalIterator) Next ¶
func (it *SignalIterator) Next() (*irmpb.Signal, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*SignalIterator) PageInfo ¶
func (it *SignalIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SubscriptionIterator ¶
type SubscriptionIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.Subscription, nextPageToken string, err error) // contains filtered or unexported fields }
SubscriptionIterator manages a stream of *irmpb.Subscription.
func (*SubscriptionIterator) Next ¶
func (it *SubscriptionIterator) Next() (*irmpb.Subscription, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*SubscriptionIterator) PageInfo ¶
func (it *SubscriptionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type TagIterator ¶
type TagIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*irmpb.Tag, nextPageToken string, err error) // contains filtered or unexported fields }
TagIterator manages a stream of *irmpb.Tag.
func (*TagIterator) Next ¶
func (it *TagIterator) Next() (*irmpb.Tag, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*TagIterator) PageInfo ¶
func (it *TagIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
Source Files ¶
doc.go incident_client.go
- Version
- v0.37.0
- Published
- Mar 11, 2019
- Platform
- js/wasm
- Imports
- 15 packages
- Last checked
- 21 minutes ago –
Tools for package owners.