-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
api.go
6494 lines (5649 loc) · 231 KB
/
api.go
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package codeguruprofiler
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opAddNotificationChannels = "AddNotificationChannels"
// AddNotificationChannelsRequest generates a "aws/request.Request" representing the
// client's request for the AddNotificationChannels operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddNotificationChannels for more information on using the AddNotificationChannels
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AddNotificationChannelsRequest method.
// req, resp := client.AddNotificationChannelsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/AddNotificationChannels
func (c *CodeGuruProfiler) AddNotificationChannelsRequest(input *AddNotificationChannelsInput) (req *request.Request, output *AddNotificationChannelsOutput) {
op := &request.Operation{
Name: opAddNotificationChannels,
HTTPMethod: "POST",
HTTPPath: "/profilingGroups/{profilingGroupName}/notificationConfiguration",
}
if input == nil {
input = &AddNotificationChannelsInput{}
}
output = &AddNotificationChannelsOutput{}
req = c.newRequest(op, input, output)
return
}
// AddNotificationChannels API operation for Amazon CodeGuru Profiler.
//
// Add up to 2 anomaly notifications channels for a profiling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation AddNotificationChannels for usage and error information.
//
// Returned Error Types:
// * ServiceQuotaExceededException
// You have exceeded your service quota. To perform the requested action, remove
// some of the relevant resources, or use Service Quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html)
// to request a service quota increase.
//
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ConflictException
// The requested operation would cause a conflict with the current state of
// a service resource associated with the request. Resolve the conflict before
// retrying this request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/AddNotificationChannels
func (c *CodeGuruProfiler) AddNotificationChannels(input *AddNotificationChannelsInput) (*AddNotificationChannelsOutput, error) {
req, out := c.AddNotificationChannelsRequest(input)
return out, req.Send()
}
// AddNotificationChannelsWithContext is the same as AddNotificationChannels with the addition of
// the ability to pass a context and additional request options.
//
// See AddNotificationChannels for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) AddNotificationChannelsWithContext(ctx aws.Context, input *AddNotificationChannelsInput, opts ...request.Option) (*AddNotificationChannelsOutput, error) {
req, out := c.AddNotificationChannelsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opBatchGetFrameMetricData = "BatchGetFrameMetricData"
// BatchGetFrameMetricDataRequest generates a "aws/request.Request" representing the
// client's request for the BatchGetFrameMetricData operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchGetFrameMetricData for more information on using the BatchGetFrameMetricData
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchGetFrameMetricDataRequest method.
// req, resp := client.BatchGetFrameMetricDataRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/BatchGetFrameMetricData
func (c *CodeGuruProfiler) BatchGetFrameMetricDataRequest(input *BatchGetFrameMetricDataInput) (req *request.Request, output *BatchGetFrameMetricDataOutput) {
op := &request.Operation{
Name: opBatchGetFrameMetricData,
HTTPMethod: "POST",
HTTPPath: "/profilingGroups/{profilingGroupName}/frames/-/metrics",
}
if input == nil {
input = &BatchGetFrameMetricDataInput{}
}
output = &BatchGetFrameMetricDataOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchGetFrameMetricData API operation for Amazon CodeGuru Profiler.
//
// Returns the time series of values for a requested list of frame metrics from
// a time period.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation BatchGetFrameMetricData for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/BatchGetFrameMetricData
func (c *CodeGuruProfiler) BatchGetFrameMetricData(input *BatchGetFrameMetricDataInput) (*BatchGetFrameMetricDataOutput, error) {
req, out := c.BatchGetFrameMetricDataRequest(input)
return out, req.Send()
}
// BatchGetFrameMetricDataWithContext is the same as BatchGetFrameMetricData with the addition of
// the ability to pass a context and additional request options.
//
// See BatchGetFrameMetricData for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) BatchGetFrameMetricDataWithContext(ctx aws.Context, input *BatchGetFrameMetricDataInput, opts ...request.Option) (*BatchGetFrameMetricDataOutput, error) {
req, out := c.BatchGetFrameMetricDataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opConfigureAgent = "ConfigureAgent"
// ConfigureAgentRequest generates a "aws/request.Request" representing the
// client's request for the ConfigureAgent operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ConfigureAgent for more information on using the ConfigureAgent
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ConfigureAgentRequest method.
// req, resp := client.ConfigureAgentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ConfigureAgent
func (c *CodeGuruProfiler) ConfigureAgentRequest(input *ConfigureAgentInput) (req *request.Request, output *ConfigureAgentOutput) {
op := &request.Operation{
Name: opConfigureAgent,
HTTPMethod: "POST",
HTTPPath: "/profilingGroups/{profilingGroupName}/configureAgent",
}
if input == nil {
input = &ConfigureAgentInput{}
}
output = &ConfigureAgentOutput{}
req = c.newRequest(op, input, output)
return
}
// ConfigureAgent API operation for Amazon CodeGuru Profiler.
//
// Used by profiler agents to report their current state and to receive remote
// configuration updates. For example, ConfigureAgent can be used to tell an
// agent whether to profile or not and for how long to return profiling data.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation ConfigureAgent for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ConfigureAgent
func (c *CodeGuruProfiler) ConfigureAgent(input *ConfigureAgentInput) (*ConfigureAgentOutput, error) {
req, out := c.ConfigureAgentRequest(input)
return out, req.Send()
}
// ConfigureAgentWithContext is the same as ConfigureAgent with the addition of
// the ability to pass a context and additional request options.
//
// See ConfigureAgent for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) ConfigureAgentWithContext(ctx aws.Context, input *ConfigureAgentInput, opts ...request.Option) (*ConfigureAgentOutput, error) {
req, out := c.ConfigureAgentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateProfilingGroup = "CreateProfilingGroup"
// CreateProfilingGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateProfilingGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateProfilingGroup for more information on using the CreateProfilingGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateProfilingGroupRequest method.
// req, resp := client.CreateProfilingGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/CreateProfilingGroup
func (c *CodeGuruProfiler) CreateProfilingGroupRequest(input *CreateProfilingGroupInput) (req *request.Request, output *CreateProfilingGroupOutput) {
op := &request.Operation{
Name: opCreateProfilingGroup,
HTTPMethod: "POST",
HTTPPath: "/profilingGroups",
}
if input == nil {
input = &CreateProfilingGroupInput{}
}
output = &CreateProfilingGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateProfilingGroup API operation for Amazon CodeGuru Profiler.
//
// Creates a profiling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation CreateProfilingGroup for usage and error information.
//
// Returned Error Types:
// * ServiceQuotaExceededException
// You have exceeded your service quota. To perform the requested action, remove
// some of the relevant resources, or use Service Quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html)
// to request a service quota increase.
//
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ConflictException
// The requested operation would cause a conflict with the current state of
// a service resource associated with the request. Resolve the conflict before
// retrying this request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/CreateProfilingGroup
func (c *CodeGuruProfiler) CreateProfilingGroup(input *CreateProfilingGroupInput) (*CreateProfilingGroupOutput, error) {
req, out := c.CreateProfilingGroupRequest(input)
return out, req.Send()
}
// CreateProfilingGroupWithContext is the same as CreateProfilingGroup with the addition of
// the ability to pass a context and additional request options.
//
// See CreateProfilingGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) CreateProfilingGroupWithContext(ctx aws.Context, input *CreateProfilingGroupInput, opts ...request.Option) (*CreateProfilingGroupOutput, error) {
req, out := c.CreateProfilingGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteProfilingGroup = "DeleteProfilingGroup"
// DeleteProfilingGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteProfilingGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteProfilingGroup for more information on using the DeleteProfilingGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteProfilingGroupRequest method.
// req, resp := client.DeleteProfilingGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DeleteProfilingGroup
func (c *CodeGuruProfiler) DeleteProfilingGroupRequest(input *DeleteProfilingGroupInput) (req *request.Request, output *DeleteProfilingGroupOutput) {
op := &request.Operation{
Name: opDeleteProfilingGroup,
HTTPMethod: "DELETE",
HTTPPath: "/profilingGroups/{profilingGroupName}",
}
if input == nil {
input = &DeleteProfilingGroupInput{}
}
output = &DeleteProfilingGroupOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteProfilingGroup API operation for Amazon CodeGuru Profiler.
//
// Deletes a profiling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation DeleteProfilingGroup for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ConflictException
// The requested operation would cause a conflict with the current state of
// a service resource associated with the request. Resolve the conflict before
// retrying this request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DeleteProfilingGroup
func (c *CodeGuruProfiler) DeleteProfilingGroup(input *DeleteProfilingGroupInput) (*DeleteProfilingGroupOutput, error) {
req, out := c.DeleteProfilingGroupRequest(input)
return out, req.Send()
}
// DeleteProfilingGroupWithContext is the same as DeleteProfilingGroup with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteProfilingGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) DeleteProfilingGroupWithContext(ctx aws.Context, input *DeleteProfilingGroupInput, opts ...request.Option) (*DeleteProfilingGroupOutput, error) {
req, out := c.DeleteProfilingGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeProfilingGroup = "DescribeProfilingGroup"
// DescribeProfilingGroupRequest generates a "aws/request.Request" representing the
// client's request for the DescribeProfilingGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeProfilingGroup for more information on using the DescribeProfilingGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeProfilingGroupRequest method.
// req, resp := client.DescribeProfilingGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DescribeProfilingGroup
func (c *CodeGuruProfiler) DescribeProfilingGroupRequest(input *DescribeProfilingGroupInput) (req *request.Request, output *DescribeProfilingGroupOutput) {
op := &request.Operation{
Name: opDescribeProfilingGroup,
HTTPMethod: "GET",
HTTPPath: "/profilingGroups/{profilingGroupName}",
}
if input == nil {
input = &DescribeProfilingGroupInput{}
}
output = &DescribeProfilingGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeProfilingGroup API operation for Amazon CodeGuru Profiler.
//
// Returns a ProfilingGroupDescription (https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingGroupDescription.html)
// object that contains information about the requested profiling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation DescribeProfilingGroup for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DescribeProfilingGroup
func (c *CodeGuruProfiler) DescribeProfilingGroup(input *DescribeProfilingGroupInput) (*DescribeProfilingGroupOutput, error) {
req, out := c.DescribeProfilingGroupRequest(input)
return out, req.Send()
}
// DescribeProfilingGroupWithContext is the same as DescribeProfilingGroup with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeProfilingGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) DescribeProfilingGroupWithContext(ctx aws.Context, input *DescribeProfilingGroupInput, opts ...request.Option) (*DescribeProfilingGroupOutput, error) {
req, out := c.DescribeProfilingGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFindingsReportAccountSummary = "GetFindingsReportAccountSummary"
// GetFindingsReportAccountSummaryRequest generates a "aws/request.Request" representing the
// client's request for the GetFindingsReportAccountSummary operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetFindingsReportAccountSummary for more information on using the GetFindingsReportAccountSummary
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetFindingsReportAccountSummaryRequest method.
// req, resp := client.GetFindingsReportAccountSummaryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetFindingsReportAccountSummary
func (c *CodeGuruProfiler) GetFindingsReportAccountSummaryRequest(input *GetFindingsReportAccountSummaryInput) (req *request.Request, output *GetFindingsReportAccountSummaryOutput) {
op := &request.Operation{
Name: opGetFindingsReportAccountSummary,
HTTPMethod: "GET",
HTTPPath: "/internal/findingsReports",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetFindingsReportAccountSummaryInput{}
}
output = &GetFindingsReportAccountSummaryOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFindingsReportAccountSummary API operation for Amazon CodeGuru Profiler.
//
// Returns a list of FindingsReportSummary (https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_FindingsReportSummary.html)
// objects that contain analysis results for all profiling groups in your AWS
// account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation GetFindingsReportAccountSummary for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetFindingsReportAccountSummary
func (c *CodeGuruProfiler) GetFindingsReportAccountSummary(input *GetFindingsReportAccountSummaryInput) (*GetFindingsReportAccountSummaryOutput, error) {
req, out := c.GetFindingsReportAccountSummaryRequest(input)
return out, req.Send()
}
// GetFindingsReportAccountSummaryWithContext is the same as GetFindingsReportAccountSummary with the addition of
// the ability to pass a context and additional request options.
//
// See GetFindingsReportAccountSummary for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) GetFindingsReportAccountSummaryWithContext(ctx aws.Context, input *GetFindingsReportAccountSummaryInput, opts ...request.Option) (*GetFindingsReportAccountSummaryOutput, error) {
req, out := c.GetFindingsReportAccountSummaryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// GetFindingsReportAccountSummaryPages iterates over the pages of a GetFindingsReportAccountSummary operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetFindingsReportAccountSummary method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetFindingsReportAccountSummary operation.
// pageNum := 0
// err := client.GetFindingsReportAccountSummaryPages(params,
// func(page *codeguruprofiler.GetFindingsReportAccountSummaryOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *CodeGuruProfiler) GetFindingsReportAccountSummaryPages(input *GetFindingsReportAccountSummaryInput, fn func(*GetFindingsReportAccountSummaryOutput, bool) bool) error {
return c.GetFindingsReportAccountSummaryPagesWithContext(aws.BackgroundContext(), input, fn)
}
// GetFindingsReportAccountSummaryPagesWithContext same as GetFindingsReportAccountSummaryPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) GetFindingsReportAccountSummaryPagesWithContext(ctx aws.Context, input *GetFindingsReportAccountSummaryInput, fn func(*GetFindingsReportAccountSummaryOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetFindingsReportAccountSummaryInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetFindingsReportAccountSummaryRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*GetFindingsReportAccountSummaryOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opGetNotificationConfiguration = "GetNotificationConfiguration"
// GetNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetNotificationConfiguration operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetNotificationConfiguration for more information on using the GetNotificationConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetNotificationConfigurationRequest method.
// req, resp := client.GetNotificationConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetNotificationConfiguration
func (c *CodeGuruProfiler) GetNotificationConfigurationRequest(input *GetNotificationConfigurationInput) (req *request.Request, output *GetNotificationConfigurationOutput) {
op := &request.Operation{
Name: opGetNotificationConfiguration,
HTTPMethod: "GET",
HTTPPath: "/profilingGroups/{profilingGroupName}/notificationConfiguration",
}
if input == nil {
input = &GetNotificationConfigurationInput{}
}
output = &GetNotificationConfigurationOutput{}
req = c.newRequest(op, input, output)
return
}
// GetNotificationConfiguration API operation for Amazon CodeGuru Profiler.
//
// Get the current configuration for anomaly notifications for a profiling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation GetNotificationConfiguration for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetNotificationConfiguration
func (c *CodeGuruProfiler) GetNotificationConfiguration(input *GetNotificationConfigurationInput) (*GetNotificationConfigurationOutput, error) {
req, out := c.GetNotificationConfigurationRequest(input)
return out, req.Send()
}
// GetNotificationConfigurationWithContext is the same as GetNotificationConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See GetNotificationConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) GetNotificationConfigurationWithContext(ctx aws.Context, input *GetNotificationConfigurationInput, opts ...request.Option) (*GetNotificationConfigurationOutput, error) {
req, out := c.GetNotificationConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetPolicy = "GetPolicy"
// GetPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetPolicy for more information on using the GetPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetPolicyRequest method.
// req, resp := client.GetPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetPolicy
func (c *CodeGuruProfiler) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) {
op := &request.Operation{
Name: opGetPolicy,
HTTPMethod: "GET",
HTTPPath: "/profilingGroups/{profilingGroupName}/policy",
}
if input == nil {
input = &GetPolicyInput{}
}
output = &GetPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// GetPolicy API operation for Amazon CodeGuru Profiler.
//
// Returns the JSON-formatted resource-based policy on a profiling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation GetPolicy for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetPolicy
func (c *CodeGuruProfiler) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
req, out := c.GetPolicyRequest(input)
return out, req.Send()
}
// GetPolicyWithContext is the same as GetPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeGuruProfiler) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) {
req, out := c.GetPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetProfile = "GetProfile"
// GetProfileRequest generates a "aws/request.Request" representing the
// client's request for the GetProfile operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetProfile for more information on using the GetProfile
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetProfileRequest method.
// req, resp := client.GetProfileRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetProfile
func (c *CodeGuruProfiler) GetProfileRequest(input *GetProfileInput) (req *request.Request, output *GetProfileOutput) {
op := &request.Operation{
Name: opGetProfile,
HTTPMethod: "GET",
HTTPPath: "/profilingGroups/{profilingGroupName}/profile",
}
if input == nil {
input = &GetProfileInput{}
}
output = &GetProfileOutput{}
req = c.newRequest(op, input, output)
return
}
// GetProfile API operation for Amazon CodeGuru Profiler.
//
// Gets the aggregated profile of a profiling group for a specified time range.
// Amazon CodeGuru Profiler collects posted agent profiles for a profiling group
// into aggregated profiles.
//
// <note> <p> Because aggregated profiles expire over time <code>GetProfile</code>
// is not idempotent. </p> </note> <p> Specify the time range for the requested
// aggregated profile using 1 or 2 of the following parameters: <code>startTime</code>,
// <code>endTime</code>, <code>period</code>. The maximum time range allowed
// is 7 days. If you specify all 3 parameters, an exception is thrown. If
// you specify only <code>period</code>, the latest aggregated profile is
// returned. </p> <p> Aggregated profiles are available with aggregation
// periods of 5 minutes, 1 hour, and 1 day, aligned to UTC. The aggregation
// period of an aggregated profile determines how long it is retained. For
// more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AggregatedProfileTime.html">
// <code>AggregatedProfileTime</code> </a>. The aggregated profile's aggregation
// period determines how long it is retained by CodeGuru Profiler. </p> <ul>
// <li> <p> If the aggregation period is 5 minutes, the aggregated profile
// is retained for 15 days. </p> </li> <li> <p> If the aggregation period
// is 1 hour, the aggregated profile is retained for 60 days. </p> </li>
// <li> <p> If the aggregation period is 1 day, the aggregated profile is
// retained for 3 years. </p> </li> </ul> <p>There are two use cases for
// calling <code>GetProfile</code>.</p> <ol> <li> <p> If you want to return
// an aggregated profile that already exists, use <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ListProfileTimes.html">
// <code>ListProfileTimes</code> </a> to view the time ranges of existing
// aggregated profiles. Use them in a <code>GetProfile</code> request to
// return a specific, existing aggregated profile. </p> </li> <li> <p> If
// you want to return an aggregated profile for a time range that doesn't
// align with an existing aggregated profile, then CodeGuru Profiler makes
// a best effort to combine existing aggregated profiles from the requested
// time range and return them as one aggregated profile. </p> <p> If aggregated
// profiles do not exist for the full time range requested, then aggregated
// profiles for a smaller time range are returned. For example, if the requested
// time range is from 00:00 to 00:20, and the existing aggregated profiles
// are from 00:15 and 00:25, then the aggregated profiles from 00:15 to 00:20
// are returned. </p> </li> </ol>
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CodeGuru Profiler's
// API operation GetProfile for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The server encountered an internal error and is unable to complete the request.
//
// * ValidationException
// The parameter is not valid.
//
// * ThrottlingException
// The request was denied due to request throttling.
//
// * ResourceNotFoundException
// The resource specified in the request does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetProfile
func (c *CodeGuruProfiler) GetProfile(input *GetProfileInput) (*GetProfileOutput, error) {
req, out := c.GetProfileRequest(input)
return out, req.Send()
}
// GetProfileWithContext is the same as GetProfile with the addition of
// the ability to pass a context and additional request options.
//
// See GetProfile for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If