-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
api.go
10202 lines (8837 loc) · 375 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 pcaconnectorad
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 opCreateConnector = "CreateConnector"
// CreateConnectorRequest generates a "aws/request.Request" representing the
// client's request for the CreateConnector 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 CreateConnector for more information on using the CreateConnector
// 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 CreateConnectorRequest method.
// req, resp := client.CreateConnectorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateConnector
func (c *PcaConnectorAd) CreateConnectorRequest(input *CreateConnectorInput) (req *request.Request, output *CreateConnectorOutput) {
op := &request.Operation{
Name: opCreateConnector,
HTTPMethod: "POST",
HTTPPath: "/connectors",
}
if input == nil {
input = &CreateConnectorInput{}
}
output = &CreateConnectorOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateConnector API operation for PcaConnectorAd.
//
// Creates a connector between Amazon Web Services Private CA and an Active
// Directory. You must specify the private CA, directory ID, and security groups.
//
// 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 PcaConnectorAd's
// API operation CreateConnector for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - ServiceQuotaExceededException
// Request would cause a service quota to be exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateConnector
func (c *PcaConnectorAd) CreateConnector(input *CreateConnectorInput) (*CreateConnectorOutput, error) {
req, out := c.CreateConnectorRequest(input)
return out, req.Send()
}
// CreateConnectorWithContext is the same as CreateConnector with the addition of
// the ability to pass a context and additional request options.
//
// See CreateConnector 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 *PcaConnectorAd) CreateConnectorWithContext(ctx aws.Context, input *CreateConnectorInput, opts ...request.Option) (*CreateConnectorOutput, error) {
req, out := c.CreateConnectorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateDirectoryRegistration = "CreateDirectoryRegistration"
// CreateDirectoryRegistrationRequest generates a "aws/request.Request" representing the
// client's request for the CreateDirectoryRegistration 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 CreateDirectoryRegistration for more information on using the CreateDirectoryRegistration
// 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 CreateDirectoryRegistrationRequest method.
// req, resp := client.CreateDirectoryRegistrationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateDirectoryRegistration
func (c *PcaConnectorAd) CreateDirectoryRegistrationRequest(input *CreateDirectoryRegistrationInput) (req *request.Request, output *CreateDirectoryRegistrationOutput) {
op := &request.Operation{
Name: opCreateDirectoryRegistration,
HTTPMethod: "POST",
HTTPPath: "/directoryRegistrations",
}
if input == nil {
input = &CreateDirectoryRegistrationInput{}
}
output = &CreateDirectoryRegistrationOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateDirectoryRegistration API operation for PcaConnectorAd.
//
// Creates a directory registration that authorizes communication between Amazon
// Web Services Private CA and an Active Directory
//
// 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 PcaConnectorAd's
// API operation CreateDirectoryRegistration for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateDirectoryRegistration
func (c *PcaConnectorAd) CreateDirectoryRegistration(input *CreateDirectoryRegistrationInput) (*CreateDirectoryRegistrationOutput, error) {
req, out := c.CreateDirectoryRegistrationRequest(input)
return out, req.Send()
}
// CreateDirectoryRegistrationWithContext is the same as CreateDirectoryRegistration with the addition of
// the ability to pass a context and additional request options.
//
// See CreateDirectoryRegistration 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 *PcaConnectorAd) CreateDirectoryRegistrationWithContext(ctx aws.Context, input *CreateDirectoryRegistrationInput, opts ...request.Option) (*CreateDirectoryRegistrationOutput, error) {
req, out := c.CreateDirectoryRegistrationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateServicePrincipalName = "CreateServicePrincipalName"
// CreateServicePrincipalNameRequest generates a "aws/request.Request" representing the
// client's request for the CreateServicePrincipalName 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 CreateServicePrincipalName for more information on using the CreateServicePrincipalName
// 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 CreateServicePrincipalNameRequest method.
// req, resp := client.CreateServicePrincipalNameRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateServicePrincipalName
func (c *PcaConnectorAd) CreateServicePrincipalNameRequest(input *CreateServicePrincipalNameInput) (req *request.Request, output *CreateServicePrincipalNameOutput) {
op := &request.Operation{
Name: opCreateServicePrincipalName,
HTTPMethod: "POST",
HTTPPath: "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}",
}
if input == nil {
input = &CreateServicePrincipalNameInput{}
}
output = &CreateServicePrincipalNameOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateServicePrincipalName API operation for PcaConnectorAd.
//
// Creates a service principal name (SPN) for the service account in Active
// Directory. Kerberos authentication uses SPNs to associate a service instance
// with a service sign-in 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 PcaConnectorAd's
// API operation CreateServicePrincipalName for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateServicePrincipalName
func (c *PcaConnectorAd) CreateServicePrincipalName(input *CreateServicePrincipalNameInput) (*CreateServicePrincipalNameOutput, error) {
req, out := c.CreateServicePrincipalNameRequest(input)
return out, req.Send()
}
// CreateServicePrincipalNameWithContext is the same as CreateServicePrincipalName with the addition of
// the ability to pass a context and additional request options.
//
// See CreateServicePrincipalName 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 *PcaConnectorAd) CreateServicePrincipalNameWithContext(ctx aws.Context, input *CreateServicePrincipalNameInput, opts ...request.Option) (*CreateServicePrincipalNameOutput, error) {
req, out := c.CreateServicePrincipalNameRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateTemplate = "CreateTemplate"
// CreateTemplateRequest generates a "aws/request.Request" representing the
// client's request for the CreateTemplate 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 CreateTemplate for more information on using the CreateTemplate
// 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 CreateTemplateRequest method.
// req, resp := client.CreateTemplateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateTemplate
func (c *PcaConnectorAd) CreateTemplateRequest(input *CreateTemplateInput) (req *request.Request, output *CreateTemplateOutput) {
op := &request.Operation{
Name: opCreateTemplate,
HTTPMethod: "POST",
HTTPPath: "/templates",
}
if input == nil {
input = &CreateTemplateInput{}
}
output = &CreateTemplateOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateTemplate API operation for PcaConnectorAd.
//
// Creates an Active Directory compatible certificate template. The connectors
// issues certificates using these templates based on the requester’s Active
// Directory group membership.
//
// 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 PcaConnectorAd's
// API operation CreateTemplate for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - ServiceQuotaExceededException
// Request would cause a service quota to be exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateTemplate
func (c *PcaConnectorAd) CreateTemplate(input *CreateTemplateInput) (*CreateTemplateOutput, error) {
req, out := c.CreateTemplateRequest(input)
return out, req.Send()
}
// CreateTemplateWithContext is the same as CreateTemplate with the addition of
// the ability to pass a context and additional request options.
//
// See CreateTemplate 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 *PcaConnectorAd) CreateTemplateWithContext(ctx aws.Context, input *CreateTemplateInput, opts ...request.Option) (*CreateTemplateOutput, error) {
req, out := c.CreateTemplateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateTemplateGroupAccessControlEntry = "CreateTemplateGroupAccessControlEntry"
// CreateTemplateGroupAccessControlEntryRequest generates a "aws/request.Request" representing the
// client's request for the CreateTemplateGroupAccessControlEntry 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 CreateTemplateGroupAccessControlEntry for more information on using the CreateTemplateGroupAccessControlEntry
// 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 CreateTemplateGroupAccessControlEntryRequest method.
// req, resp := client.CreateTemplateGroupAccessControlEntryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateTemplateGroupAccessControlEntry
func (c *PcaConnectorAd) CreateTemplateGroupAccessControlEntryRequest(input *CreateTemplateGroupAccessControlEntryInput) (req *request.Request, output *CreateTemplateGroupAccessControlEntryOutput) {
op := &request.Operation{
Name: opCreateTemplateGroupAccessControlEntry,
HTTPMethod: "POST",
HTTPPath: "/templates/{TemplateArn}/accessControlEntries",
}
if input == nil {
input = &CreateTemplateGroupAccessControlEntryInput{}
}
output = &CreateTemplateGroupAccessControlEntryOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateTemplateGroupAccessControlEntry API operation for PcaConnectorAd.
//
// Create a group access control entry. Allow or deny Active Directory groups
// from enrolling and/or autoenrolling with the template based on the group
// security identifiers (SIDs).
//
// 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 PcaConnectorAd's
// API operation CreateTemplateGroupAccessControlEntry for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - ServiceQuotaExceededException
// Request would cause a service quota to be exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/CreateTemplateGroupAccessControlEntry
func (c *PcaConnectorAd) CreateTemplateGroupAccessControlEntry(input *CreateTemplateGroupAccessControlEntryInput) (*CreateTemplateGroupAccessControlEntryOutput, error) {
req, out := c.CreateTemplateGroupAccessControlEntryRequest(input)
return out, req.Send()
}
// CreateTemplateGroupAccessControlEntryWithContext is the same as CreateTemplateGroupAccessControlEntry with the addition of
// the ability to pass a context and additional request options.
//
// See CreateTemplateGroupAccessControlEntry 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 *PcaConnectorAd) CreateTemplateGroupAccessControlEntryWithContext(ctx aws.Context, input *CreateTemplateGroupAccessControlEntryInput, opts ...request.Option) (*CreateTemplateGroupAccessControlEntryOutput, error) {
req, out := c.CreateTemplateGroupAccessControlEntryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteConnector = "DeleteConnector"
// DeleteConnectorRequest generates a "aws/request.Request" representing the
// client's request for the DeleteConnector 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 DeleteConnector for more information on using the DeleteConnector
// 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 DeleteConnectorRequest method.
// req, resp := client.DeleteConnectorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteConnector
func (c *PcaConnectorAd) DeleteConnectorRequest(input *DeleteConnectorInput) (req *request.Request, output *DeleteConnectorOutput) {
op := &request.Operation{
Name: opDeleteConnector,
HTTPMethod: "DELETE",
HTTPPath: "/connectors/{ConnectorArn}",
}
if input == nil {
input = &DeleteConnectorInput{}
}
output = &DeleteConnectorOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteConnector API operation for PcaConnectorAd.
//
// Deletes a connector for Active Directory. You must provide the Amazon Resource
// Name (ARN) of the connector that you want to delete. You can find the ARN
// by calling the https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_ListConnectors
// (https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_ListConnectors)
// action. Deleting a connector does not deregister your directory with Amazon
// Web Services Private CA. You can deregister your directory by calling the
// https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_DeleteDirectoryRegistration
// (https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_DeleteDirectoryRegistration)
// action.
//
// 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 PcaConnectorAd's
// API operation DeleteConnector for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteConnector
func (c *PcaConnectorAd) DeleteConnector(input *DeleteConnectorInput) (*DeleteConnectorOutput, error) {
req, out := c.DeleteConnectorRequest(input)
return out, req.Send()
}
// DeleteConnectorWithContext is the same as DeleteConnector with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteConnector 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 *PcaConnectorAd) DeleteConnectorWithContext(ctx aws.Context, input *DeleteConnectorInput, opts ...request.Option) (*DeleteConnectorOutput, error) {
req, out := c.DeleteConnectorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteDirectoryRegistration = "DeleteDirectoryRegistration"
// DeleteDirectoryRegistrationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDirectoryRegistration 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 DeleteDirectoryRegistration for more information on using the DeleteDirectoryRegistration
// 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 DeleteDirectoryRegistrationRequest method.
// req, resp := client.DeleteDirectoryRegistrationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteDirectoryRegistration
func (c *PcaConnectorAd) DeleteDirectoryRegistrationRequest(input *DeleteDirectoryRegistrationInput) (req *request.Request, output *DeleteDirectoryRegistrationOutput) {
op := &request.Operation{
Name: opDeleteDirectoryRegistration,
HTTPMethod: "DELETE",
HTTPPath: "/directoryRegistrations/{DirectoryRegistrationArn}",
}
if input == nil {
input = &DeleteDirectoryRegistrationInput{}
}
output = &DeleteDirectoryRegistrationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteDirectoryRegistration API operation for PcaConnectorAd.
//
// Deletes a directory registration. Deleting a directory registration deauthorizes
// Amazon Web Services Private CA with the directory.
//
// 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 PcaConnectorAd's
// API operation DeleteDirectoryRegistration for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteDirectoryRegistration
func (c *PcaConnectorAd) DeleteDirectoryRegistration(input *DeleteDirectoryRegistrationInput) (*DeleteDirectoryRegistrationOutput, error) {
req, out := c.DeleteDirectoryRegistrationRequest(input)
return out, req.Send()
}
// DeleteDirectoryRegistrationWithContext is the same as DeleteDirectoryRegistration with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteDirectoryRegistration 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 *PcaConnectorAd) DeleteDirectoryRegistrationWithContext(ctx aws.Context, input *DeleteDirectoryRegistrationInput, opts ...request.Option) (*DeleteDirectoryRegistrationOutput, error) {
req, out := c.DeleteDirectoryRegistrationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteServicePrincipalName = "DeleteServicePrincipalName"
// DeleteServicePrincipalNameRequest generates a "aws/request.Request" representing the
// client's request for the DeleteServicePrincipalName 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 DeleteServicePrincipalName for more information on using the DeleteServicePrincipalName
// 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 DeleteServicePrincipalNameRequest method.
// req, resp := client.DeleteServicePrincipalNameRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteServicePrincipalName
func (c *PcaConnectorAd) DeleteServicePrincipalNameRequest(input *DeleteServicePrincipalNameInput) (req *request.Request, output *DeleteServicePrincipalNameOutput) {
op := &request.Operation{
Name: opDeleteServicePrincipalName,
HTTPMethod: "DELETE",
HTTPPath: "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}",
}
if input == nil {
input = &DeleteServicePrincipalNameInput{}
}
output = &DeleteServicePrincipalNameOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteServicePrincipalName API operation for PcaConnectorAd.
//
// Deletes the service principal name (SPN) used by a connector to authenticate
// with your Active Directory.
//
// 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 PcaConnectorAd's
// API operation DeleteServicePrincipalName for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteServicePrincipalName
func (c *PcaConnectorAd) DeleteServicePrincipalName(input *DeleteServicePrincipalNameInput) (*DeleteServicePrincipalNameOutput, error) {
req, out := c.DeleteServicePrincipalNameRequest(input)
return out, req.Send()
}
// DeleteServicePrincipalNameWithContext is the same as DeleteServicePrincipalName with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteServicePrincipalName 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 *PcaConnectorAd) DeleteServicePrincipalNameWithContext(ctx aws.Context, input *DeleteServicePrincipalNameInput, opts ...request.Option) (*DeleteServicePrincipalNameOutput, error) {
req, out := c.DeleteServicePrincipalNameRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteTemplate = "DeleteTemplate"
// DeleteTemplateRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTemplate 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 DeleteTemplate for more information on using the DeleteTemplate
// 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 DeleteTemplateRequest method.
// req, resp := client.DeleteTemplateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteTemplate
func (c *PcaConnectorAd) DeleteTemplateRequest(input *DeleteTemplateInput) (req *request.Request, output *DeleteTemplateOutput) {
op := &request.Operation{
Name: opDeleteTemplate,
HTTPMethod: "DELETE",
HTTPPath: "/templates/{TemplateArn}",
}
if input == nil {
input = &DeleteTemplateInput{}
}
output = &DeleteTemplateOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteTemplate API operation for PcaConnectorAd.
//
// Deletes a template. Certificates issued using the template are still valid
// until they are revoked or expired.
//
// 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 PcaConnectorAd's
// API operation DeleteTemplate for usage and error information.
//
// Returned Error Types:
//
// - AccessDeniedException
// You can receive this error if you attempt to create a resource share when
// you don't have the required permissions. This can be caused by insufficient
// permissions in policies attached to your Amazon Web Services Identity and
// Access Management (IAM) principal. It can also happen because of restrictions
// in place from an Amazon Web Services Organizations service control policy
// (SCP) that affects your Amazon Web Services account.
//
// - ValidationException
// An input validation error occurred. For example, invalid characters in a
// template name, or if a pagination token is invalid.
//
// - ResourceNotFoundException
// The operation tried to access a nonexistent resource. The resource might
// not be specified correctly, or its status might not be ACTIVE.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// - InternalServerException
// The request processing has failed because of an unknown error, exception
// or failure with an internal server.
//
// - ConflictException
// This request cannot be completed for one of the following reasons because
// the requested resource was being concurrently modified by another request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteTemplate
func (c *PcaConnectorAd) DeleteTemplate(input *DeleteTemplateInput) (*DeleteTemplateOutput, error) {
req, out := c.DeleteTemplateRequest(input)
return out, req.Send()
}
// DeleteTemplateWithContext is the same as DeleteTemplate with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteTemplate 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 *PcaConnectorAd) DeleteTemplateWithContext(ctx aws.Context, input *DeleteTemplateInput, opts ...request.Option) (*DeleteTemplateOutput, error) {
req, out := c.DeleteTemplateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteTemplateGroupAccessControlEntry = "DeleteTemplateGroupAccessControlEntry"
// DeleteTemplateGroupAccessControlEntryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTemplateGroupAccessControlEntry 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 DeleteTemplateGroupAccessControlEntry for more information on using the DeleteTemplateGroupAccessControlEntry
// 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 DeleteTemplateGroupAccessControlEntryRequest method.
// req, resp := client.DeleteTemplateGroupAccessControlEntryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/DeleteTemplateGroupAccessControlEntry
func (c *PcaConnectorAd) DeleteTemplateGroupAccessControlEntryRequest(input *DeleteTemplateGroupAccessControlEntryInput) (req *request.Request, output *DeleteTemplateGroupAccessControlEntryOutput) {
op := &request.Operation{
Name: opDeleteTemplateGroupAccessControlEntry,
HTTPMethod: "DELETE",
HTTPPath: "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}",
}