Documentation ¶
Overview ¶
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.
Use of Context ¶
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit godoc.org/cloud.google.com/go.
Index ¶
- func DefaultAuthScopes() []string
- type AnnotationIterator
- type ArtifactIterator
- type IncidentCallOptions
- type IncidentClient
- func (c *IncidentClient) CancelIncidentRoleHandover(ctx context.Context, req *irmpb.CancelIncidentRoleHandoverRequest, ...) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) Close() error
- func (c *IncidentClient) ConfirmIncidentRoleHandover(ctx context.Context, req *irmpb.ConfirmIncidentRoleHandoverRequest, ...) (*irmpb.IncidentRoleAssignment, error)
- func (c *IncidentClient) Connection() *grpc.ClientConn
- func (c *IncidentClient) CreateAnnotation(ctx context.Context, req *irmpb.CreateAnnotationRequest, ...) (*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, ...) (*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, ...) (*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, ...) error
- func (c *IncidentClient) DeleteSubscription(ctx context.Context, req *irmpb.DeleteSubscriptionRequest, ...) 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, ...) (*irmpb.EscalateIncidentResponse, error)
- func (c *IncidentClient) ForceIncidentRoleHandover(ctx context.Context, req *irmpb.ForceIncidentRoleHandoverRequest, ...) (*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, ...) *IncidentRoleAssignmentIterator
- func (c *IncidentClient) ListSubscriptions(ctx context.Context, req *irmpb.ListSubscriptionsRequest, ...) *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, ...) (*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, ...) *SearchSimilarIncidentsResponse_ResultIterator
- func (c *IncidentClient) SendShiftHandoff(ctx context.Context, req *irmpb.SendShiftHandoffRequest, ...) (*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, ...) (*irmpb.Subscription, error)
- type IncidentIterator
- type IncidentRoleAssignmentIterator
- type SearchSimilarIncidentsResponse_ResultIterator
- type SignalIterator
- type SubscriptionIterator
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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.
Example ¶
package main import ( "context" irm "cloud.google.com/go/irm/apiv1alpha2" ) func main() { ctx := context.Background() c, err := irm.NewIncidentClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c }
Output:
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.
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 }
Output:
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.
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 }
Output:
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.
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 }
Output:
func (*IncidentClient) CreateArtifact ¶
func (c *IncidentClient) CreateArtifact(ctx context.Context, req *irmpb.CreateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)
CreateArtifact creates a new artifact.
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 }
Output:
func (*IncidentClient) CreateIncident ¶
func (c *IncidentClient) CreateIncident(ctx context.Context, req *irmpb.CreateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
CreateIncident creates a new incident.
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 }
Output:
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.
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 }
Output:
func (*IncidentClient) CreateSignal ¶
func (c *IncidentClient) CreateSignal(ctx context.Context, req *irmpb.CreateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)
CreateSignal creates a new signal.
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 }
Output:
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
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 }
Output:
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.
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 }
Output:
func (*IncidentClient) DeleteArtifact ¶
func (c *IncidentClient) DeleteArtifact(ctx context.Context, req *irmpb.DeleteArtifactRequest, opts ...gax.CallOption) error
DeleteArtifact deletes an existing artifact.
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. } }
Output:
func (*IncidentClient) DeleteIncidentRoleAssignment ¶
func (c *IncidentClient) DeleteIncidentRoleAssignment(ctx context.Context, req *irmpb.DeleteIncidentRoleAssignmentRequest, opts ...gax.CallOption) error
DeleteIncidentRoleAssignment deletes an existing role assignment.
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. } }
Output:
func (*IncidentClient) DeleteSubscription ¶
func (c *IncidentClient) DeleteSubscription(ctx context.Context, req *irmpb.DeleteSubscriptionRequest, opts ...gax.CallOption) error
DeleteSubscription deletes an existing subscription.
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. } }
Output:
func (*IncidentClient) DeleteTag ¶
func (c *IncidentClient) DeleteTag(ctx context.Context, req *irmpb.DeleteTagRequest, opts ...gax.CallOption) error
DeleteTag deletes an existing tag.
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. } }
Output:
func (*IncidentClient) EscalateIncident ¶
func (c *IncidentClient) EscalateIncident(ctx context.Context, req *irmpb.EscalateIncidentRequest, opts ...gax.CallOption) (*irmpb.EscalateIncidentResponse, error)
EscalateIncident escalates an incident.
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 }
Output:
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.
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 }
Output:
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.
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 }
Output:
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.
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 }
Output:
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.
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 } }
Output:
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.
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 } }
Output:
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.
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 } }
Output:
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.
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 } }
Output:
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.
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 } }
Output:
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.
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 }
Output:
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.
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 } }
Output:
func (*IncidentClient) SearchSignals ¶ added in v0.37.0
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.
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 } }
Output:
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.
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 } }
Output:
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.
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 }
Output:
func (*IncidentClient) UpdateArtifact ¶
func (c *IncidentClient) UpdateArtifact(ctx context.Context, req *irmpb.UpdateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)
UpdateArtifact updates an existing artifact.
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 }
Output:
func (*IncidentClient) UpdateIncident ¶
func (c *IncidentClient) UpdateIncident(ctx context.Context, req *irmpb.UpdateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)
UpdateIncident updates an existing incident.
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 }
Output:
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).
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 }
Output:
func (*IncidentClient) UpdateSubscription ¶ added in v0.37.0
func (c *IncidentClient) UpdateSubscription(ctx context.Context, req *irmpb.UpdateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)
UpdateSubscription updates a subscription.
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 }
Output:
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.