-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherror_ingestion_rules.go
More file actions
95 lines (84 loc) · 3.77 KB
/
Copy patherror_ingestion_rules.go
File metadata and controls
95 lines (84 loc) · 3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Code generated by internal/cmd/gen; DO NOT EDIT.
package flashduty
import "context"
// ErrorIngestionRulesService handles the "RUM/Error ingestion rules" API resource.
type ErrorIngestionRulesService service
// Create an error ingestion rule.
//
// Create a new error ingestion rule that filters which errors are stored.
//
// API: POST /rum/error-ingestion/rules/create (rum-error-ingestion-rules-create).
func (s *ErrorIngestionRulesService) Create(ctx context.Context, req *RUMErrorIngestionCreateRequest) (*RUMErrorIngestionCreateResponse, *Response, error) {
out := new(RUMErrorIngestionCreateResponse)
resp, err := s.client.do(ctx, "/rum/error-ingestion/rules/create", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// Delete an error ingestion rule.
//
// Delete an error ingestion rule from a RUM application.
//
// API: POST /rum/error-ingestion/rules/delete (rum-error-ingestion-rules-delete).
func (s *ErrorIngestionRulesService) Delete(ctx context.Context, req *RUMErrorIngestionRuleIDRequest) (*Response, error) {
return s.client.do(ctx, "/rum/error-ingestion/rules/delete", req, nil)
}
// Disable an error ingestion rule.
//
// Disable an error ingestion rule without deleting it.
//
// API: POST /rum/error-ingestion/rules/disable (rum-error-ingestion-rules-disable).
func (s *ErrorIngestionRulesService) Disable(ctx context.Context, req *RUMErrorIngestionRuleIDRequest) (*Response, error) {
return s.client.do(ctx, "/rum/error-ingestion/rules/disable", req, nil)
}
// Enable an error ingestion rule.
//
// Re-enable a previously disabled error ingestion rule.
//
// API: POST /rum/error-ingestion/rules/enable (rum-error-ingestion-rules-enable).
func (s *ErrorIngestionRulesService) Enable(ctx context.Context, req *RUMErrorIngestionRuleIDRequest) (*Response, error) {
return s.client.do(ctx, "/rum/error-ingestion/rules/enable", req, nil)
}
// List error ingestion rule history.
//
// Return paginated snapshots of an application's error ingestion rule history.
//
// API: POST /rum/error-ingestion/rules/history/list (rum-error-ingestion-rules-history-list).
func (s *ErrorIngestionRulesService) HistoryList(ctx context.Context, req *RUMErrorIngestionHistoryListRequest) (*RUMErrorIngestionHistoryListResponse, *Response, error) {
out := new(RUMErrorIngestionHistoryListResponse)
resp, err := s.client.do(ctx, "/rum/error-ingestion/rules/history/list", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// Revert error ingestion rules to a history version.
//
// Restore an application's entire rule set to a prior history version.
//
// API: POST /rum/error-ingestion/rules/history/revert (rum-error-ingestion-rules-history-revert).
func (s *ErrorIngestionRulesService) HistoryRevert(ctx context.Context, req *RUMErrorIngestionRevertRequest) (*Response, error) {
return s.client.do(ctx, "/rum/error-ingestion/rules/history/revert", req, nil)
}
// List error ingestion rules.
//
// Return every error ingestion rule configured for a RUM application.
//
// API: POST /rum/error-ingestion/rules/list (rum-error-ingestion-rules-list).
func (s *ErrorIngestionRulesService) List(ctx context.Context, req *RUMErrorIngestionListRequest) (*RUMErrorIngestionListResponse, *Response, error) {
out := new(RUMErrorIngestionListResponse)
resp, err := s.client.do(ctx, "/rum/error-ingestion/rules/list", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// Update an error ingestion rule.
//
// Update the name, description, or filters of an error ingestion rule.
//
// API: POST /rum/error-ingestion/rules/update (rum-error-ingestion-rules-update).
func (s *ErrorIngestionRulesService) Update(ctx context.Context, req *RUMErrorIngestionUpdateRequest) (*Response, error) {
return s.client.do(ctx, "/rum/error-ingestion/rules/update", req, nil)
}