forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
4113 lines (3628 loc) · 148 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
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package cognitoidentity provides a client for Amazon Cognito Identity.
package cognitoidentity
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/jsonrpc"
)
const opCreateIdentityPool = "CreateIdentityPool"
// CreateIdentityPoolRequest generates a "aws/request.Request" representing the
// client's request for the CreateIdentityPool operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateIdentityPool for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateIdentityPool method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateIdentityPoolRequest method.
// req, resp := client.CreateIdentityPoolRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/CreateIdentityPool
func (c *CognitoIdentity) CreateIdentityPoolRequest(input *CreateIdentityPoolInput) (req *request.Request, output *IdentityPool) {
op := &request.Operation{
Name: opCreateIdentityPool,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateIdentityPoolInput{}
}
output = &IdentityPool{}
req = c.newRequest(op, input, output)
return
}
// CreateIdentityPool API operation for Amazon Cognito Identity.
//
// Creates a new identity pool. The identity pool is a store of user identity
// information that is specific to your AWS account. The limit on identity pools
// is 60 per account. The keys for SupportedLoginProviders are as follows:
//
// * Facebook: graph.facebook.com
//
// * Google: accounts.google.com
//
// * Amazon: www.amazon.com
//
// * Twitter: api.twitter.com
//
// * Digits: www.digits.com
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation CreateIdentityPool for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// Thrown when a user tries to use a login which is already linked to another
// account.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Thrown when the total number of user pools has exceeded a preset limit.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/CreateIdentityPool
func (c *CognitoIdentity) CreateIdentityPool(input *CreateIdentityPoolInput) (*IdentityPool, error) {
req, out := c.CreateIdentityPoolRequest(input)
return out, req.Send()
}
// CreateIdentityPoolWithContext is the same as CreateIdentityPool with the addition of
// the ability to pass a context and additional request options.
//
// See CreateIdentityPool 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 *CognitoIdentity) CreateIdentityPoolWithContext(ctx aws.Context, input *CreateIdentityPoolInput, opts ...request.Option) (*IdentityPool, error) {
req, out := c.CreateIdentityPoolRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteIdentities = "DeleteIdentities"
// DeleteIdentitiesRequest generates a "aws/request.Request" representing the
// client's request for the DeleteIdentities operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteIdentities for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteIdentities method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteIdentitiesRequest method.
// req, resp := client.DeleteIdentitiesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentities
func (c *CognitoIdentity) DeleteIdentitiesRequest(input *DeleteIdentitiesInput) (req *request.Request, output *DeleteIdentitiesOutput) {
op := &request.Operation{
Name: opDeleteIdentities,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteIdentitiesInput{}
}
output = &DeleteIdentitiesOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteIdentities API operation for Amazon Cognito Identity.
//
// Deletes identities from an identity pool. You can specify a list of 1-60
// identities that you want to delete.
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation DeleteIdentities for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentities
func (c *CognitoIdentity) DeleteIdentities(input *DeleteIdentitiesInput) (*DeleteIdentitiesOutput, error) {
req, out := c.DeleteIdentitiesRequest(input)
return out, req.Send()
}
// DeleteIdentitiesWithContext is the same as DeleteIdentities with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteIdentities 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 *CognitoIdentity) DeleteIdentitiesWithContext(ctx aws.Context, input *DeleteIdentitiesInput, opts ...request.Option) (*DeleteIdentitiesOutput, error) {
req, out := c.DeleteIdentitiesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteIdentityPool = "DeleteIdentityPool"
// DeleteIdentityPoolRequest generates a "aws/request.Request" representing the
// client's request for the DeleteIdentityPool operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteIdentityPool for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteIdentityPool method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteIdentityPoolRequest method.
// req, resp := client.DeleteIdentityPoolRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentityPool
func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInput) (req *request.Request, output *DeleteIdentityPoolOutput) {
op := &request.Operation{
Name: opDeleteIdentityPool,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteIdentityPoolInput{}
}
output = &DeleteIdentityPoolOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteIdentityPool API operation for Amazon Cognito Identity.
//
// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
// with the pool.
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation DeleteIdentityPool for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentityPool
func (c *CognitoIdentity) DeleteIdentityPool(input *DeleteIdentityPoolInput) (*DeleteIdentityPoolOutput, error) {
req, out := c.DeleteIdentityPoolRequest(input)
return out, req.Send()
}
// DeleteIdentityPoolWithContext is the same as DeleteIdentityPool with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteIdentityPool 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 *CognitoIdentity) DeleteIdentityPoolWithContext(ctx aws.Context, input *DeleteIdentityPoolInput, opts ...request.Option) (*DeleteIdentityPoolOutput, error) {
req, out := c.DeleteIdentityPoolRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeIdentity = "DescribeIdentity"
// DescribeIdentityRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdentity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeIdentity for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeIdentity method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeIdentityRequest method.
// req, resp := client.DescribeIdentityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentity
func (c *CognitoIdentity) DescribeIdentityRequest(input *DescribeIdentityInput) (req *request.Request, output *IdentityDescription) {
op := &request.Operation{
Name: opDescribeIdentity,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeIdentityInput{}
}
output = &IdentityDescription{}
req = c.newRequest(op, input, output)
return
}
// DescribeIdentity API operation for Amazon Cognito Identity.
//
// Returns metadata related to the given identity, including when the identity
// was created and any associated linked logins.
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation DescribeIdentity for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentity
func (c *CognitoIdentity) DescribeIdentity(input *DescribeIdentityInput) (*IdentityDescription, error) {
req, out := c.DescribeIdentityRequest(input)
return out, req.Send()
}
// DescribeIdentityWithContext is the same as DescribeIdentity with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeIdentity 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 *CognitoIdentity) DescribeIdentityWithContext(ctx aws.Context, input *DescribeIdentityInput, opts ...request.Option) (*IdentityDescription, error) {
req, out := c.DescribeIdentityRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeIdentityPool = "DescribeIdentityPool"
// DescribeIdentityPoolRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdentityPool operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeIdentityPool for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeIdentityPool method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeIdentityPoolRequest method.
// req, resp := client.DescribeIdentityPoolRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentityPool
func (c *CognitoIdentity) DescribeIdentityPoolRequest(input *DescribeIdentityPoolInput) (req *request.Request, output *IdentityPool) {
op := &request.Operation{
Name: opDescribeIdentityPool,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeIdentityPoolInput{}
}
output = &IdentityPool{}
req = c.newRequest(op, input, output)
return
}
// DescribeIdentityPool API operation for Amazon Cognito Identity.
//
// Gets details about a particular identity pool, including the pool name, ID
// description, creation date, and current number of users.
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation DescribeIdentityPool for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentityPool
func (c *CognitoIdentity) DescribeIdentityPool(input *DescribeIdentityPoolInput) (*IdentityPool, error) {
req, out := c.DescribeIdentityPoolRequest(input)
return out, req.Send()
}
// DescribeIdentityPoolWithContext is the same as DescribeIdentityPool with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeIdentityPool 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 *CognitoIdentity) DescribeIdentityPoolWithContext(ctx aws.Context, input *DescribeIdentityPoolInput, opts ...request.Option) (*IdentityPool, error) {
req, out := c.DescribeIdentityPoolRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetCredentialsForIdentity = "GetCredentialsForIdentity"
// GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the
// client's request for the GetCredentialsForIdentity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetCredentialsForIdentity for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetCredentialsForIdentity method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetCredentialsForIdentityRequest method.
// req, resp := client.GetCredentialsForIdentityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetCredentialsForIdentity
func (c *CognitoIdentity) GetCredentialsForIdentityRequest(input *GetCredentialsForIdentityInput) (req *request.Request, output *GetCredentialsForIdentityOutput) {
op := &request.Operation{
Name: opGetCredentialsForIdentity,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetCredentialsForIdentityInput{}
}
output = &GetCredentialsForIdentityOutput{}
req = c.newRequest(op, input, output)
return
}
// GetCredentialsForIdentity API operation for Amazon Cognito Identity.
//
// Returns credentials for the provided identity ID. Any provided logins will
// be validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
// it will be passed through to AWS Security Token Service with the appropriate
// role for the token.
//
// This is a public API. You do not need any credentials to call this API.
//
// 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 Cognito Identity's
// API operation GetCredentialsForIdentity for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// Thrown when a user tries to use a login which is already linked to another
// account.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInvalidIdentityPoolConfigurationException "InvalidIdentityPoolConfigurationException"
// Thrown if the identity pool has no role associated for the given auth type
// (auth/unauth) or if the AssumeRole fails.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// * ErrCodeExternalServiceException "ExternalServiceException"
// An exception thrown when a dependent service such as Facebook or Twitter
// is not responding
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetCredentialsForIdentity
func (c *CognitoIdentity) GetCredentialsForIdentity(input *GetCredentialsForIdentityInput) (*GetCredentialsForIdentityOutput, error) {
req, out := c.GetCredentialsForIdentityRequest(input)
return out, req.Send()
}
// GetCredentialsForIdentityWithContext is the same as GetCredentialsForIdentity with the addition of
// the ability to pass a context and additional request options.
//
// See GetCredentialsForIdentity 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 *CognitoIdentity) GetCredentialsForIdentityWithContext(ctx aws.Context, input *GetCredentialsForIdentityInput, opts ...request.Option) (*GetCredentialsForIdentityOutput, error) {
req, out := c.GetCredentialsForIdentityRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetId = "GetId"
// GetIdRequest generates a "aws/request.Request" representing the
// client's request for the GetId operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetId for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetId method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetIdRequest method.
// req, resp := client.GetIdRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetId
func (c *CognitoIdentity) GetIdRequest(input *GetIdInput) (req *request.Request, output *GetIdOutput) {
op := &request.Operation{
Name: opGetId,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetIdInput{}
}
output = &GetIdOutput{}
req = c.newRequest(op, input, output)
return
}
// GetId API operation for Amazon Cognito Identity.
//
// Generates (or retrieves) a Cognito ID. Supplying multiple logins will create
// an implicit linked account.
//
// This is a public API. You do not need any credentials to call this API.
//
// 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 Cognito Identity's
// API operation GetId for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// Thrown when a user tries to use a login which is already linked to another
// account.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Thrown when the total number of user pools has exceeded a preset limit.
//
// * ErrCodeExternalServiceException "ExternalServiceException"
// An exception thrown when a dependent service such as Facebook or Twitter
// is not responding
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetId
func (c *CognitoIdentity) GetId(input *GetIdInput) (*GetIdOutput, error) {
req, out := c.GetIdRequest(input)
return out, req.Send()
}
// GetIdWithContext is the same as GetId with the addition of
// the ability to pass a context and additional request options.
//
// See GetId 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 *CognitoIdentity) GetIdWithContext(ctx aws.Context, input *GetIdInput, opts ...request.Option) (*GetIdOutput, error) {
req, out := c.GetIdRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetIdentityPoolRoles = "GetIdentityPoolRoles"
// GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
// client's request for the GetIdentityPoolRoles operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetIdentityPoolRoles for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetIdentityPoolRoles method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetIdentityPoolRolesRequest method.
// req, resp := client.GetIdentityPoolRolesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetIdentityPoolRoles
func (c *CognitoIdentity) GetIdentityPoolRolesRequest(input *GetIdentityPoolRolesInput) (req *request.Request, output *GetIdentityPoolRolesOutput) {
op := &request.Operation{
Name: opGetIdentityPoolRoles,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetIdentityPoolRolesInput{}
}
output = &GetIdentityPoolRolesOutput{}
req = c.newRequest(op, input, output)
return
}
// GetIdentityPoolRoles API operation for Amazon Cognito Identity.
//
// Gets the roles for an identity pool.
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation GetIdentityPoolRoles for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// Thrown when a user tries to use a login which is already linked to another
// account.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetIdentityPoolRoles
func (c *CognitoIdentity) GetIdentityPoolRoles(input *GetIdentityPoolRolesInput) (*GetIdentityPoolRolesOutput, error) {
req, out := c.GetIdentityPoolRolesRequest(input)
return out, req.Send()
}
// GetIdentityPoolRolesWithContext is the same as GetIdentityPoolRoles with the addition of
// the ability to pass a context and additional request options.
//
// See GetIdentityPoolRoles 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 *CognitoIdentity) GetIdentityPoolRolesWithContext(ctx aws.Context, input *GetIdentityPoolRolesInput, opts ...request.Option) (*GetIdentityPoolRolesOutput, error) {
req, out := c.GetIdentityPoolRolesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetOpenIdToken = "GetOpenIdToken"
// GetOpenIdTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetOpenIdToken operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetOpenIdToken for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetOpenIdToken method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetOpenIdTokenRequest method.
// req, resp := client.GetOpenIdTokenRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdToken
func (c *CognitoIdentity) GetOpenIdTokenRequest(input *GetOpenIdTokenInput) (req *request.Request, output *GetOpenIdTokenOutput) {
op := &request.Operation{
Name: opGetOpenIdToken,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetOpenIdTokenInput{}
}
output = &GetOpenIdTokenOutput{}
req = c.newRequest(op, input, output)
return
}
// GetOpenIdToken API operation for Amazon Cognito Identity.
//
// Gets an OpenID token, using a known Cognito ID. This known Cognito ID is
// returned by GetId. You can optionally add additional logins for the identity.
// Supplying multiple logins creates an implicit link.
//
// The OpenId token is valid for 15 minutes.
//
// This is a public API. You do not need any credentials to call this API.
//
// 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 Cognito Identity's
// API operation GetOpenIdToken for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Thrown when the requested resource (for example, a dataset or record) does
// not exist.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// Thrown when a user is not authorized to access the requested resource.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// Thrown when a user tries to use a login which is already linked to another
// account.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// Thrown when a request is throttled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// Thrown when the service encounters an error during processing the request.
//
// * ErrCodeExternalServiceException "ExternalServiceException"
// An exception thrown when a dependent service such as Facebook or Twitter
// is not responding
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdToken
func (c *CognitoIdentity) GetOpenIdToken(input *GetOpenIdTokenInput) (*GetOpenIdTokenOutput, error) {
req, out := c.GetOpenIdTokenRequest(input)
return out, req.Send()
}
// GetOpenIdTokenWithContext is the same as GetOpenIdToken with the addition of
// the ability to pass a context and additional request options.
//
// See GetOpenIdToken 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 *CognitoIdentity) GetOpenIdTokenWithContext(ctx aws.Context, input *GetOpenIdTokenInput, opts ...request.Option) (*GetOpenIdTokenOutput, error) {
req, out := c.GetOpenIdTokenRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity"
// GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the
// client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetOpenIdTokenForDeveloperIdentity for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetOpenIdTokenForDeveloperIdentity method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetOpenIdTokenForDeveloperIdentityRequest method.
// req, resp := client.GetOpenIdTokenForDeveloperIdentityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdTokenForDeveloperIdentity
func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityRequest(input *GetOpenIdTokenForDeveloperIdentityInput) (req *request.Request, output *GetOpenIdTokenForDeveloperIdentityOutput) {
op := &request.Operation{
Name: opGetOpenIdTokenForDeveloperIdentity,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetOpenIdTokenForDeveloperIdentityInput{}
}
output = &GetOpenIdTokenForDeveloperIdentityOutput{}
req = c.newRequest(op, input, output)
return
}
// GetOpenIdTokenForDeveloperIdentity API operation for Amazon Cognito Identity.
//
// Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token
// for a user authenticated by your backend authentication process. Supplying
// multiple logins will create an implicit linked account. You can only specify
// one developer provider as part of the Logins map, which is linked to the
// identity pool. The developer provider is the "domain" by which Cognito will
// refer to your users.
//
// You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and
// to link new logins (that is, user credentials issued by a public provider
// or developer provider) to an existing identity. When you want to create a
// new identity, the IdentityId should be null. When you want to associate a
// new login with an existing authenticated/unauthenticated identity, you can
// do so by providing the existing IdentityId. This API will create the identity
// in the specified IdentityPoolId.
//
// You must use AWS Developer credentials to call this API.
//
// 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 Cognito Identity's
// API operation GetOpenIdTokenForDeveloperIdentity for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Thrown for missing or bad input parameter(s).