-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
api.go
1088 lines (926 loc) · 35.1 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 eksauth
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"
)
const opAssumeRoleForPodIdentity = "AssumeRoleForPodIdentity"
// AssumeRoleForPodIdentityRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleForPodIdentity 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 AssumeRoleForPodIdentity for more information on using the AssumeRoleForPodIdentity
// 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 AssumeRoleForPodIdentityRequest method.
// req, resp := client.AssumeRoleForPodIdentityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-auth-2023-11-26/AssumeRoleForPodIdentity
func (c *EKSAuth) AssumeRoleForPodIdentityRequest(input *AssumeRoleForPodIdentityInput) (req *request.Request, output *AssumeRoleForPodIdentityOutput) {
op := &request.Operation{
Name: opAssumeRoleForPodIdentity,
HTTPMethod: "POST",
HTTPPath: "/clusters/{clusterName}/assume-role-for-pod-identity",
}
if input == nil {
input = &AssumeRoleForPodIdentityInput{}
}
output = &AssumeRoleForPodIdentityOutput{}
req = c.newRequest(op, input, output)
return
}
// AssumeRoleForPodIdentity API operation for Amazon EKS Auth.
//
// The Amazon EKS Auth API and the AssumeRoleForPodIdentity action are only
// used by the EKS Pod Identity Agent.
//
// We recommend that applications use the Amazon Web Services SDKs to connect
// to Amazon Web Services services; if credentials from an EKS Pod Identity
// association are available in the pod, the latest versions of the SDKs use
// them automatically.
//
// 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 EKS Auth's
// API operation AssumeRoleForPodIdentity for usage and error information.
//
// Returned Error Types:
//
// - ThrottlingException
// The request was denied because your request rate is too high. Reduce the
// frequency of requests.
//
// - InvalidRequestException
// This exception is thrown if the request contains a semantic error. The precise
// meaning will depend on the API, and will be documented in the error message.
//
// - AccessDeniedException
// You don't have permissions to perform the requested operation. The IAM principal
// making the request must have at least one IAM permissions policy attached
// that grants the required permissions. For more information, see Access management
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the IAM
// User Guide.
//
// - InternalServerException
// These errors are usually caused by a server-side issue.
//
// - InvalidTokenException
// The specified Kubernetes service account token is invalid.
//
// - InvalidParameterException
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// - ExpiredTokenException
// The specified Kubernetes service account token is expired.
//
// - ResourceNotFoundException
// The specified resource could not be found.
//
// - ServiceUnavailableException
// The service is unavailable. Back off and retry the operation.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-auth-2023-11-26/AssumeRoleForPodIdentity
func (c *EKSAuth) AssumeRoleForPodIdentity(input *AssumeRoleForPodIdentityInput) (*AssumeRoleForPodIdentityOutput, error) {
req, out := c.AssumeRoleForPodIdentityRequest(input)
return out, req.Send()
}
// AssumeRoleForPodIdentityWithContext is the same as AssumeRoleForPodIdentity with the addition of
// the ability to pass a context and additional request options.
//
// See AssumeRoleForPodIdentity 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 *EKSAuth) AssumeRoleForPodIdentityWithContext(ctx aws.Context, input *AssumeRoleForPodIdentityInput, opts ...request.Option) (*AssumeRoleForPodIdentityOutput, error) {
req, out := c.AssumeRoleForPodIdentityRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// You don't have permissions to perform the requested operation. The IAM principal
// making the request must have at least one IAM permissions policy attached
// that grants the required permissions. For more information, see Access management
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the IAM
// User Guide.
type AccessDeniedException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccessDeniedException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccessDeniedException) GoString() string {
return s.String()
}
func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
return &AccessDeniedException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *AccessDeniedException) Code() string {
return "AccessDeniedException"
}
// Message returns the exception's message.
func (s *AccessDeniedException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *AccessDeniedException) OrigErr() error {
return nil
}
func (s *AccessDeniedException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *AccessDeniedException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *AccessDeniedException) RequestID() string {
return s.RespMetadata.RequestID
}
type AssumeRoleForPodIdentityInput struct {
_ struct{} `type:"structure"`
// The name of the cluster for the request.
//
// ClusterName is a required field
ClusterName *string `location:"uri" locationName:"clusterName" min:"1" type:"string" required:"true"`
// The token of the Kubernetes service account for the pod.
//
// Token is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by AssumeRoleForPodIdentityInput's
// String and GoString methods.
//
// Token is a required field
Token *string `locationName:"token" min:"1" type:"string" required:"true" sensitive:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AssumeRoleForPodIdentityInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AssumeRoleForPodIdentityInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AssumeRoleForPodIdentityInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "AssumeRoleForPodIdentityInput"}
if s.ClusterName == nil {
invalidParams.Add(request.NewErrParamRequired("ClusterName"))
}
if s.ClusterName != nil && len(*s.ClusterName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ClusterName", 1))
}
if s.Token == nil {
invalidParams.Add(request.NewErrParamRequired("Token"))
}
if s.Token != nil && len(*s.Token) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Token", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClusterName sets the ClusterName field's value.
func (s *AssumeRoleForPodIdentityInput) SetClusterName(v string) *AssumeRoleForPodIdentityInput {
s.ClusterName = &v
return s
}
// SetToken sets the Token field's value.
func (s *AssumeRoleForPodIdentityInput) SetToken(v string) *AssumeRoleForPodIdentityInput {
s.Token = &v
return s
}
type AssumeRoleForPodIdentityOutput struct {
_ struct{} `type:"structure"`
// An object with the permanent IAM role identity and the temporary session
// name.
//
// The ARN of the IAM role that the temporary credentials authenticate to.
//
// The session name of the temporary session requested to STS. The value is
// a unique identifier that contains the role ID, a colon (:), and the role
// session name of the role that is being assumed. The role ID is generated
// by IAM when the role is created. The role session name part of the value
// follows this format: eks-clustername-podname-random UUID
//
// AssumedRoleUser is a required field
AssumedRoleUser *AssumedRoleUser `locationName:"assumedRoleUser" type:"structure" required:"true"`
// The identity that is allowed to use the credentials. This value is always
// pods.eks.amazonaws.com.
//
// Audience is a required field
Audience *string `locationName:"audience" type:"string" required:"true"`
// The Amazon Web Services Signature Version 4 type of temporary credentials.
//
// Credentials is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by AssumeRoleForPodIdentityOutput's
// String and GoString methods.
//
// Credentials is a required field
Credentials *Credentials `locationName:"credentials" type:"structure" required:"true" sensitive:"true"`
// The Amazon Resource Name (ARN) and ID of the EKS Pod Identity association.
//
// PodIdentityAssociation is a required field
PodIdentityAssociation *PodIdentityAssociation `locationName:"podIdentityAssociation" type:"structure" required:"true"`
// The name of the Kubernetes service account inside the cluster to associate
// the IAM credentials with.
//
// Subject is a required field
Subject *Subject `locationName:"subject" type:"structure" required:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AssumeRoleForPodIdentityOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AssumeRoleForPodIdentityOutput) GoString() string {
return s.String()
}
// SetAssumedRoleUser sets the AssumedRoleUser field's value.
func (s *AssumeRoleForPodIdentityOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleForPodIdentityOutput {
s.AssumedRoleUser = v
return s
}
// SetAudience sets the Audience field's value.
func (s *AssumeRoleForPodIdentityOutput) SetAudience(v string) *AssumeRoleForPodIdentityOutput {
s.Audience = &v
return s
}
// SetCredentials sets the Credentials field's value.
func (s *AssumeRoleForPodIdentityOutput) SetCredentials(v *Credentials) *AssumeRoleForPodIdentityOutput {
s.Credentials = v
return s
}
// SetPodIdentityAssociation sets the PodIdentityAssociation field's value.
func (s *AssumeRoleForPodIdentityOutput) SetPodIdentityAssociation(v *PodIdentityAssociation) *AssumeRoleForPodIdentityOutput {
s.PodIdentityAssociation = v
return s
}
// SetSubject sets the Subject field's value.
func (s *AssumeRoleForPodIdentityOutput) SetSubject(v *Subject) *AssumeRoleForPodIdentityOutput {
s.Subject = v
return s
}
// An object with the permanent IAM role identity and the temporary session
// name.
type AssumedRoleUser struct {
_ struct{} `type:"structure"`
// The ARN of the IAM role that the temporary credentials authenticate to.
//
// Arn is a required field
Arn *string `locationName:"arn" type:"string" required:"true"`
// The session name of the temporary session requested to STS. The value is
// a unique identifier that contains the role ID, a colon (:), and the role
// session name of the role that is being assumed. The role ID is generated
// by IAM when the role is created. The role session name part of the value
// follows this format: eks-clustername-podname-random UUID
//
// AssumeRoleId is a required field
AssumeRoleId *string `locationName:"assumeRoleId" type:"string" required:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AssumedRoleUser) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AssumedRoleUser) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser {
s.Arn = &v
return s
}
// SetAssumeRoleId sets the AssumeRoleId field's value.
func (s *AssumedRoleUser) SetAssumeRoleId(v string) *AssumedRoleUser {
s.AssumeRoleId = &v
return s
}
// The Amazon Web Services Signature Version 4 type of temporary credentials.
type Credentials struct {
_ struct{} `type:"structure" sensitive:"true"`
// The access key ID that identifies the temporary security credentials.
//
// AccessKeyId is a required field
AccessKeyId *string `locationName:"accessKeyId" type:"string" required:"true"`
// The Unix epoch timestamp in seconds when the current credentials expire.
//
// Expiration is a required field
Expiration *time.Time `locationName:"expiration" type:"timestamp" required:"true"`
// The secret access key that applications inside the pods use to sign requests.
//
// SecretAccessKey is a required field
SecretAccessKey *string `locationName:"secretAccessKey" type:"string" required:"true"`
// The token that applications inside the pods must pass to any service API
// to use the temporary credentials.
//
// SessionToken is a required field
SessionToken *string `locationName:"sessionToken" type:"string" required:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Credentials) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Credentials) GoString() string {
return s.String()
}
// SetAccessKeyId sets the AccessKeyId field's value.
func (s *Credentials) SetAccessKeyId(v string) *Credentials {
s.AccessKeyId = &v
return s
}
// SetExpiration sets the Expiration field's value.
func (s *Credentials) SetExpiration(v time.Time) *Credentials {
s.Expiration = &v
return s
}
// SetSecretAccessKey sets the SecretAccessKey field's value.
func (s *Credentials) SetSecretAccessKey(v string) *Credentials {
s.SecretAccessKey = &v
return s
}
// SetSessionToken sets the SessionToken field's value.
func (s *Credentials) SetSessionToken(v string) *Credentials {
s.SessionToken = &v
return s
}
// The specified Kubernetes service account token is expired.
type ExpiredTokenException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ExpiredTokenException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ExpiredTokenException) GoString() string {
return s.String()
}
func newErrorExpiredTokenException(v protocol.ResponseMetadata) error {
return &ExpiredTokenException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ExpiredTokenException) Code() string {
return "ExpiredTokenException"
}
// Message returns the exception's message.
func (s *ExpiredTokenException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ExpiredTokenException) OrigErr() error {
return nil
}
func (s *ExpiredTokenException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ExpiredTokenException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ExpiredTokenException) RequestID() string {
return s.RespMetadata.RequestID
}
// These errors are usually caused by a server-side issue.
type InternalServerException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InternalServerException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InternalServerException) GoString() string {
return s.String()
}
func newErrorInternalServerException(v protocol.ResponseMetadata) error {
return &InternalServerException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InternalServerException) Code() string {
return "InternalServerException"
}
// Message returns the exception's message.
func (s *InternalServerException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InternalServerException) OrigErr() error {
return nil
}
func (s *InternalServerException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InternalServerException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InternalServerException) RequestID() string {
return s.RespMetadata.RequestID
}
// The specified parameter is invalid. Review the available parameters for the
// API request.
type InvalidParameterException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidParameterException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidParameterException) GoString() string {
return s.String()
}
func newErrorInvalidParameterException(v protocol.ResponseMetadata) error {
return &InvalidParameterException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InvalidParameterException) Code() string {
return "InvalidParameterException"
}
// Message returns the exception's message.
func (s *InvalidParameterException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidParameterException) OrigErr() error {
return nil
}
func (s *InvalidParameterException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InvalidParameterException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InvalidParameterException) RequestID() string {
return s.RespMetadata.RequestID
}
// This exception is thrown if the request contains a semantic error. The precise
// meaning will depend on the API, and will be documented in the error message.
type InvalidRequestException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidRequestException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidRequestException) GoString() string {
return s.String()
}
func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
return &InvalidRequestException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InvalidRequestException) Code() string {
return "InvalidRequestException"
}
// Message returns the exception's message.
func (s *InvalidRequestException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidRequestException) OrigErr() error {
return nil
}
func (s *InvalidRequestException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InvalidRequestException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InvalidRequestException) RequestID() string {
return s.RespMetadata.RequestID
}
// The specified Kubernetes service account token is invalid.
type InvalidTokenException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTokenException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTokenException) GoString() string {
return s.String()
}
func newErrorInvalidTokenException(v protocol.ResponseMetadata) error {
return &InvalidTokenException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InvalidTokenException) Code() string {
return "InvalidTokenException"
}
// Message returns the exception's message.
func (s *InvalidTokenException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidTokenException) OrigErr() error {
return nil
}
func (s *InvalidTokenException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InvalidTokenException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InvalidTokenException) RequestID() string {
return s.RespMetadata.RequestID
}
// Amazon EKS Pod Identity associations provide the ability to manage credentials
// for your applications, similar to the way that Amazon EC2 instance profiles
// provide credentials to Amazon EC2 instances.
type PodIdentityAssociation struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the EKS Pod Identity association.
//
// AssociationArn is a required field
AssociationArn *string `locationName:"associationArn" type:"string" required:"true"`
// The ID of the association.
//
// AssociationId is a required field
AssociationId *string `locationName:"associationId" type:"string" required:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PodIdentityAssociation) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PodIdentityAssociation) GoString() string {
return s.String()
}
// SetAssociationArn sets the AssociationArn field's value.
func (s *PodIdentityAssociation) SetAssociationArn(v string) *PodIdentityAssociation {
s.AssociationArn = &v
return s
}
// SetAssociationId sets the AssociationId field's value.
func (s *PodIdentityAssociation) SetAssociationId(v string) *PodIdentityAssociation {
s.AssociationId = &v
return s
}
// The specified resource could not be found.
type ResourceNotFoundException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceNotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceNotFoundException) GoString() string {
return s.String()
}
func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
return &ResourceNotFoundException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ResourceNotFoundException) Code() string {
return "ResourceNotFoundException"
}
// Message returns the exception's message.
func (s *ResourceNotFoundException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourceNotFoundException) OrigErr() error {
return nil
}
func (s *ResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ResourceNotFoundException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ResourceNotFoundException) RequestID() string {
return s.RespMetadata.RequestID
}
// The service is unavailable. Back off and retry the operation.
type ServiceUnavailableException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ServiceUnavailableException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ServiceUnavailableException) GoString() string {
return s.String()
}
func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error {
return &ServiceUnavailableException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ServiceUnavailableException) Code() string {
return "ServiceUnavailableException"
}
// Message returns the exception's message.
func (s *ServiceUnavailableException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ServiceUnavailableException) OrigErr() error {
return nil
}
func (s *ServiceUnavailableException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ServiceUnavailableException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ServiceUnavailableException) RequestID() string {
return s.RespMetadata.RequestID
}
// An object containing the name of the Kubernetes service account inside the
// cluster to associate the IAM credentials with.
type Subject struct {
_ struct{} `type:"structure"`
// The name of the Kubernetes namespace inside the cluster to create the association
// in. The service account and the pods that use the service account must be
// in this namespace.
//
// Namespace is a required field
Namespace *string `locationName:"namespace" type:"string" required:"true"`
// The name of the Kubernetes service account inside the cluster to associate
// the IAM credentials with.
//
// ServiceAccount is a required field
ServiceAccount *string `locationName:"serviceAccount" type:"string" required:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Subject) String() string {