forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
11896 lines (10415 loc) · 423 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 redshift provides a client for Amazon Redshift.
package redshift
import (
"time"
"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/query"
)
const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIngress"
// AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeClusterSecurityGroupIngress operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AuthorizeClusterSecurityGroupIngress 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 AuthorizeClusterSecurityGroupIngress 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 AuthorizeClusterSecurityGroupIngressRequest method.
// req, resp := client.AuthorizeClusterSecurityGroupIngressRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) AuthorizeClusterSecurityGroupIngressRequest(input *AuthorizeClusterSecurityGroupIngressInput) (req *request.Request, output *AuthorizeClusterSecurityGroupIngressOutput) {
op := &request.Operation{
Name: opAuthorizeClusterSecurityGroupIngress,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AuthorizeClusterSecurityGroupIngressInput{}
}
req = c.newRequest(op, input, output)
output = &AuthorizeClusterSecurityGroupIngressOutput{}
req.Data = output
return
}
// AuthorizeClusterSecurityGroupIngress API operation for Amazon Redshift.
//
// Adds an inbound (ingress) rule to an Amazon Redshift security group. Depending
// on whether the application accessing your cluster is running on the Internet
// or an Amazon EC2 instance, you can authorize inbound access to either a Classless
// Interdomain Routing (CIDR)/Internet Protocol (IP) range or to an Amazon EC2
// security group. You can add as many as 20 ingress rules to an Amazon Redshift
// security group.
//
// If you authorize access to an Amazon EC2 security group, specify EC2SecurityGroupName
// and EC2SecurityGroupOwnerId. The Amazon EC2 security group and Amazon Redshift
// cluster must be in the same AWS region.
//
// If you authorize access to a CIDR/IP address range, specify CIDRIP. For
// an overview of CIDR blocks, see the Wikipedia article on Classless Inter-Domain
// Routing (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
//
// You must also associate the security group with a cluster so that clients
// running on these IP addresses or the EC2 instance are authorized to connect
// to the cluster. For information about managing security groups, go to Working
// with Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation AuthorizeClusterSecurityGroupIngress for usage and error information.
//
// Returned Error Codes:
// * ClusterSecurityGroupNotFound
// The cluster security group name does not refer to an existing cluster security
// group.
//
// * InvalidClusterSecurityGroupState
// The state of the cluster security group is not available.
//
// * AuthorizationAlreadyExists
// The specified CIDR block or EC2 security group is already authorized for
// the specified cluster security group.
//
// * AuthorizationQuotaExceeded
// The authorization quota for the cluster security group has been reached.
//
func (c *Redshift) AuthorizeClusterSecurityGroupIngress(input *AuthorizeClusterSecurityGroupIngressInput) (*AuthorizeClusterSecurityGroupIngressOutput, error) {
req, out := c.AuthorizeClusterSecurityGroupIngressRequest(input)
err := req.Send()
return out, err
}
const opAuthorizeSnapshotAccess = "AuthorizeSnapshotAccess"
// AuthorizeSnapshotAccessRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSnapshotAccess operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AuthorizeSnapshotAccess 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 AuthorizeSnapshotAccess 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 AuthorizeSnapshotAccessRequest method.
// req, resp := client.AuthorizeSnapshotAccessRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) AuthorizeSnapshotAccessRequest(input *AuthorizeSnapshotAccessInput) (req *request.Request, output *AuthorizeSnapshotAccessOutput) {
op := &request.Operation{
Name: opAuthorizeSnapshotAccess,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AuthorizeSnapshotAccessInput{}
}
req = c.newRequest(op, input, output)
output = &AuthorizeSnapshotAccessOutput{}
req.Data = output
return
}
// AuthorizeSnapshotAccess API operation for Amazon Redshift.
//
// Authorizes the specified AWS customer account to restore the specified snapshot.
//
// For more information about working with snapshots, go to Amazon Redshift
// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation AuthorizeSnapshotAccess for usage and error information.
//
// Returned Error Codes:
// * ClusterSnapshotNotFound
// The snapshot identifier does not refer to an existing cluster snapshot.
//
// * AuthorizationAlreadyExists
// The specified CIDR block or EC2 security group is already authorized for
// the specified cluster security group.
//
// * AuthorizationQuotaExceeded
// The authorization quota for the cluster security group has been reached.
//
// * DependentServiceRequestThrottlingFault
// The request cannot be completed because a dependent service is throttling
// requests made by Amazon Redshift on your behalf. Wait and retry the request.
//
// * InvalidClusterSnapshotState
// The specified cluster snapshot is not in the available state, or other accounts
// are authorized to access the snapshot.
//
// * LimitExceededFault
// The encryption key has exceeded its grant limit in AWS KMS.
//
func (c *Redshift) AuthorizeSnapshotAccess(input *AuthorizeSnapshotAccessInput) (*AuthorizeSnapshotAccessOutput, error) {
req, out := c.AuthorizeSnapshotAccessRequest(input)
err := req.Send()
return out, err
}
const opCopyClusterSnapshot = "CopyClusterSnapshot"
// CopyClusterSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CopyClusterSnapshot operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CopyClusterSnapshot 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 CopyClusterSnapshot 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 CopyClusterSnapshotRequest method.
// req, resp := client.CopyClusterSnapshotRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CopyClusterSnapshotRequest(input *CopyClusterSnapshotInput) (req *request.Request, output *CopyClusterSnapshotOutput) {
op := &request.Operation{
Name: opCopyClusterSnapshot,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CopyClusterSnapshotInput{}
}
req = c.newRequest(op, input, output)
output = &CopyClusterSnapshotOutput{}
req.Data = output
return
}
// CopyClusterSnapshot API operation for Amazon Redshift.
//
// Copies the specified automated cluster snapshot to a new manual cluster snapshot.
// The source must be an automated snapshot and it must be in the available
// state.
//
// When you delete a cluster, Amazon Redshift deletes any automated snapshots
// of the cluster. Also, when the retention period of the snapshot expires,
// Amazon Redshift automatically deletes it. If you want to keep an automated
// snapshot for a longer period, you can make a manual copy of the snapshot.
// Manual snapshots are retained until you delete them.
//
// For more information about working with snapshots, go to Amazon Redshift
// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CopyClusterSnapshot for usage and error information.
//
// Returned Error Codes:
// * ClusterSnapshotAlreadyExists
// The value specified as a snapshot identifier is already used by an existing
// snapshot.
//
// * ClusterSnapshotNotFound
// The snapshot identifier does not refer to an existing cluster snapshot.
//
// * InvalidClusterSnapshotState
// The specified cluster snapshot is not in the available state, or other accounts
// are authorized to access the snapshot.
//
// * ClusterSnapshotQuotaExceeded
// The request would result in the user exceeding the allowed number of cluster
// snapshots.
//
func (c *Redshift) CopyClusterSnapshot(input *CopyClusterSnapshotInput) (*CopyClusterSnapshotOutput, error) {
req, out := c.CopyClusterSnapshotRequest(input)
err := req.Send()
return out, err
}
const opCreateCluster = "CreateCluster"
// CreateClusterRequest generates a "aws/request.Request" representing the
// client's request for the CreateCluster operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateCluster 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 CreateCluster 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 CreateClusterRequest method.
// req, resp := client.CreateClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) {
op := &request.Operation{
Name: opCreateCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterInput{}
}
req = c.newRequest(op, input, output)
output = &CreateClusterOutput{}
req.Data = output
return
}
// CreateCluster API operation for Amazon Redshift.
//
// Creates a new cluster.
//
// To create the cluster in Virtual Private Cloud (VPC), you must provide a
// cluster subnet group name. The cluster subnet group identifies the subnets
// of your VPC that Amazon Redshift uses when creating the cluster. For more
// information about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CreateCluster for usage and error information.
//
// Returned Error Codes:
// * ClusterAlreadyExists
// The account already has a cluster with the given identifier.
//
// * InsufficientClusterCapacity
// The number of nodes specified exceeds the allotted capacity of the cluster.
//
// * ClusterParameterGroupNotFound
// The parameter group name does not refer to an existing parameter group.
//
// * ClusterSecurityGroupNotFound
// The cluster security group name does not refer to an existing cluster security
// group.
//
// * ClusterQuotaExceeded
// The request would exceed the allowed number of cluster instances for this
// account. For information about increasing your quota, go to Limits in Amazon
// Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * NumberOfNodesQuotaExceeded
// The operation would exceed the number of nodes allotted to the account. For
// information about increasing your quota, go to Limits in Amazon Redshift
// (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * NumberOfNodesPerClusterLimitExceeded
// The operation would exceed the number of nodes allowed for a cluster.
//
// * ClusterSubnetGroupNotFoundFault
// The cluster subnet group name does not refer to an existing cluster subnet
// group.
//
// * InvalidVPCNetworkStateFault
// The cluster subnet group does not cover all Availability Zones.
//
// * InvalidClusterSubnetGroupStateFault
// The cluster subnet group cannot be deleted because it is in use.
//
// * InvalidSubnet
// The requested subnet is not valid, or not all of the subnets are in the same
// VPC.
//
// * UnauthorizedOperation
// Your account is not authorized to perform the requested operation.
//
// * HsmClientCertificateNotFoundFault
// There is no Amazon Redshift HSM client certificate with the specified identifier.
//
// * HsmConfigurationNotFoundFault
// There is no Amazon Redshift HSM configuration with the specified identifier.
//
// * InvalidElasticIpFault
// The Elastic IP (EIP) is invalid or cannot be found.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
// * LimitExceededFault
// The encryption key has exceeded its grant limit in AWS KMS.
//
// * DependentServiceRequestThrottlingFault
// The request cannot be completed because a dependent service is throttling
// requests made by Amazon Redshift on your behalf. Wait and retry the request.
//
func (c *Redshift) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) {
req, out := c.CreateClusterRequest(input)
err := req.Send()
return out, err
}
const opCreateClusterParameterGroup = "CreateClusterParameterGroup"
// CreateClusterParameterGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateClusterParameterGroup operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateClusterParameterGroup 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 CreateClusterParameterGroup 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 CreateClusterParameterGroupRequest method.
// req, resp := client.CreateClusterParameterGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateClusterParameterGroupRequest(input *CreateClusterParameterGroupInput) (req *request.Request, output *CreateClusterParameterGroupOutput) {
op := &request.Operation{
Name: opCreateClusterParameterGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterParameterGroupInput{}
}
req = c.newRequest(op, input, output)
output = &CreateClusterParameterGroupOutput{}
req.Data = output
return
}
// CreateClusterParameterGroup API operation for Amazon Redshift.
//
// Creates an Amazon Redshift parameter group.
//
// Creating parameter groups is independent of creating clusters. You can associate
// a cluster with a parameter group when you create the cluster. You can also
// associate an existing cluster with a parameter group after the cluster is
// created by using ModifyCluster.
//
// Parameters in the parameter group define specific behavior that applies
// to the databases you create on the cluster. For more information about parameters
// and parameter groups, go to Amazon Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CreateClusterParameterGroup for usage and error information.
//
// Returned Error Codes:
// * ClusterParameterGroupQuotaExceeded
// The request would result in the user exceeding the allowed number of cluster
// parameter groups. For information about increasing your quota, go to Limits
// in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * ClusterParameterGroupAlreadyExists
// A cluster parameter group with the same name already exists.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
func (c *Redshift) CreateClusterParameterGroup(input *CreateClusterParameterGroupInput) (*CreateClusterParameterGroupOutput, error) {
req, out := c.CreateClusterParameterGroupRequest(input)
err := req.Send()
return out, err
}
const opCreateClusterSecurityGroup = "CreateClusterSecurityGroup"
// CreateClusterSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateClusterSecurityGroup operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateClusterSecurityGroup 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 CreateClusterSecurityGroup 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 CreateClusterSecurityGroupRequest method.
// req, resp := client.CreateClusterSecurityGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateClusterSecurityGroupRequest(input *CreateClusterSecurityGroupInput) (req *request.Request, output *CreateClusterSecurityGroupOutput) {
op := &request.Operation{
Name: opCreateClusterSecurityGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterSecurityGroupInput{}
}
req = c.newRequest(op, input, output)
output = &CreateClusterSecurityGroupOutput{}
req.Data = output
return
}
// CreateClusterSecurityGroup API operation for Amazon Redshift.
//
// Creates a new Amazon Redshift security group. You use security groups to
// control access to non-VPC clusters.
//
// For information about managing security groups, go to Amazon Redshift Cluster
// Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CreateClusterSecurityGroup for usage and error information.
//
// Returned Error Codes:
// * ClusterSecurityGroupAlreadyExists
// A cluster security group with the same name already exists.
//
// * QuotaExceeded.ClusterSecurityGroup
// The request would result in the user exceeding the allowed number of cluster
// security groups. For information about increasing your quota, go to Limits
// in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
func (c *Redshift) CreateClusterSecurityGroup(input *CreateClusterSecurityGroupInput) (*CreateClusterSecurityGroupOutput, error) {
req, out := c.CreateClusterSecurityGroupRequest(input)
err := req.Send()
return out, err
}
const opCreateClusterSnapshot = "CreateClusterSnapshot"
// CreateClusterSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CreateClusterSnapshot operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateClusterSnapshot 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 CreateClusterSnapshot 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 CreateClusterSnapshotRequest method.
// req, resp := client.CreateClusterSnapshotRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateClusterSnapshotRequest(input *CreateClusterSnapshotInput) (req *request.Request, output *CreateClusterSnapshotOutput) {
op := &request.Operation{
Name: opCreateClusterSnapshot,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterSnapshotInput{}
}
req = c.newRequest(op, input, output)
output = &CreateClusterSnapshotOutput{}
req.Data = output
return
}
// CreateClusterSnapshot API operation for Amazon Redshift.
//
// Creates a manual snapshot of the specified cluster. The cluster must be in
// the available state.
//
// For more information about working with snapshots, go to Amazon Redshift
// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CreateClusterSnapshot for usage and error information.
//
// Returned Error Codes:
// * ClusterSnapshotAlreadyExists
// The value specified as a snapshot identifier is already used by an existing
// snapshot.
//
// * InvalidClusterState
// The specified cluster is not in the available state.
//
// * ClusterNotFound
// The ClusterIdentifier parameter does not refer to an existing cluster.
//
// * ClusterSnapshotQuotaExceeded
// The request would result in the user exceeding the allowed number of cluster
// snapshots.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
func (c *Redshift) CreateClusterSnapshot(input *CreateClusterSnapshotInput) (*CreateClusterSnapshotOutput, error) {
req, out := c.CreateClusterSnapshotRequest(input)
err := req.Send()
return out, err
}
const opCreateClusterSubnetGroup = "CreateClusterSubnetGroup"
// CreateClusterSubnetGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateClusterSubnetGroup operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateClusterSubnetGroup 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 CreateClusterSubnetGroup 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 CreateClusterSubnetGroupRequest method.
// req, resp := client.CreateClusterSubnetGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateClusterSubnetGroupRequest(input *CreateClusterSubnetGroupInput) (req *request.Request, output *CreateClusterSubnetGroupOutput) {
op := &request.Operation{
Name: opCreateClusterSubnetGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterSubnetGroupInput{}
}
req = c.newRequest(op, input, output)
output = &CreateClusterSubnetGroupOutput{}
req.Data = output
return
}
// CreateClusterSubnetGroup API operation for Amazon Redshift.
//
// Creates a new Amazon Redshift subnet group. You must provide a list of one
// or more subnets in your existing Amazon Virtual Private Cloud (Amazon VPC)
// when creating Amazon Redshift subnet group.
//
// For information about subnet groups, go to Amazon Redshift Cluster Subnet
// Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-cluster-subnet-groups.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CreateClusterSubnetGroup for usage and error information.
//
// Returned Error Codes:
// * ClusterSubnetGroupAlreadyExists
// A ClusterSubnetGroupName is already used by an existing cluster subnet group.
//
// * ClusterSubnetGroupQuotaExceeded
// The request would result in user exceeding the allowed number of cluster
// subnet groups. For information about increasing your quota, go to Limits
// in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * ClusterSubnetQuotaExceededFault
// The request would result in user exceeding the allowed number of subnets
// in a cluster subnet groups. For information about increasing your quota,
// go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * InvalidSubnet
// The requested subnet is not valid, or not all of the subnets are in the same
// VPC.
//
// * UnauthorizedOperation
// Your account is not authorized to perform the requested operation.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
// * DependentServiceRequestThrottlingFault
// The request cannot be completed because a dependent service is throttling
// requests made by Amazon Redshift on your behalf. Wait and retry the request.
//
func (c *Redshift) CreateClusterSubnetGroup(input *CreateClusterSubnetGroupInput) (*CreateClusterSubnetGroupOutput, error) {
req, out := c.CreateClusterSubnetGroupRequest(input)
err := req.Send()
return out, err
}
const opCreateEventSubscription = "CreateEventSubscription"
// CreateEventSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateEventSubscription operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateEventSubscription 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 CreateEventSubscription 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 CreateEventSubscriptionRequest method.
// req, resp := client.CreateEventSubscriptionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput) (req *request.Request, output *CreateEventSubscriptionOutput) {
op := &request.Operation{
Name: opCreateEventSubscription,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEventSubscriptionInput{}
}
req = c.newRequest(op, input, output)
output = &CreateEventSubscriptionOutput{}
req.Data = output
return
}
// CreateEventSubscription API operation for Amazon Redshift.
//
// Creates an Amazon Redshift event notification subscription. This action requires
// an ARN (Amazon Resource Name) of an Amazon SNS topic created by either the
// Amazon Redshift console, the Amazon SNS console, or the Amazon SNS API. To
// obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and
// subscribe to the topic. The ARN is displayed in the SNS console.
//
// You can specify the source type, and lists of Amazon Redshift source IDs,
// event categories, and event severities. Notifications will be sent for all
// events you want that match those criteria. For example, you can specify source
// type = cluster, source ID = my-cluster-1 and mycluster2, event categories
// = Availability, Backup, and severity = ERROR. The subscription will only
// send notifications for those ERROR events in the Availability and Backup
// categories for the specified clusters.
//
// If you specify both the source type and source IDs, such as source type
// = cluster and source identifier = my-cluster-1, notifications will be sent
// for all the cluster events for my-cluster-1. If you specify a source type
// but do not specify a source identifier, you will receive notice of the events
// for the objects of that type in your AWS account. If you do not specify either
// the SourceType nor the SourceIdentifier, you will be notified of events generated
// from all Amazon Redshift sources belonging to your AWS account. You must
// specify a source type if you specify a source ID.
//
// 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 Redshift's
// API operation CreateEventSubscription for usage and error information.
//
// Returned Error Codes:
// * EventSubscriptionQuotaExceeded
// The request would exceed the allowed number of event subscriptions for this
// account. For information about increasing your quota, go to Limits in Amazon
// Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * SubscriptionAlreadyExist
// There is already an existing event notification subscription with the specified
// name.
//
// * SNSInvalidTopic
// Amazon SNS has responded that there is a problem with the specified Amazon
// SNS topic.
//
// * SNSNoAuthorization
// You do not have permission to publish to the specified Amazon SNS topic.
//
// * SNSTopicArnNotFound
// An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not
// exist.
//
// * SubscriptionEventIdNotFound
// An Amazon Redshift event with the specified event ID does not exist.
//
// * SubscriptionCategoryNotFound
// The value specified for the event category was not one of the allowed values,
// or it specified a category that does not apply to the specified source type.
// The allowed values are Configuration, Management, Monitoring, and Security.
//
// * SubscriptionSeverityNotFound
// The value specified for the event severity was not one of the allowed values,
// or it specified a severity that does not apply to the specified source type.
// The allowed values are ERROR and INFO.
//
// * SourceNotFound
// The specified Amazon Redshift event source could not be found.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
func (c *Redshift) CreateEventSubscription(input *CreateEventSubscriptionInput) (*CreateEventSubscriptionOutput, error) {
req, out := c.CreateEventSubscriptionRequest(input)
err := req.Send()
return out, err
}
const opCreateHsmClientCertificate = "CreateHsmClientCertificate"
// CreateHsmClientCertificateRequest generates a "aws/request.Request" representing the
// client's request for the CreateHsmClientCertificate operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateHsmClientCertificate 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 CreateHsmClientCertificate 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 CreateHsmClientCertificateRequest method.
// req, resp := client.CreateHsmClientCertificateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Redshift) CreateHsmClientCertificateRequest(input *CreateHsmClientCertificateInput) (req *request.Request, output *CreateHsmClientCertificateOutput) {
op := &request.Operation{
Name: opCreateHsmClientCertificate,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateHsmClientCertificateInput{}
}
req = c.newRequest(op, input, output)
output = &CreateHsmClientCertificateOutput{}
req.Data = output
return
}
// CreateHsmClientCertificate API operation for Amazon Redshift.
//
// Creates an HSM client certificate that an Amazon Redshift cluster will use
// to connect to the client's HSM in order to store and retrieve the keys used
// to encrypt the cluster databases.
//
// The command returns a public key, which you must store in the HSM. In addition
// to creating the HSM certificate, you must create an Amazon Redshift HSM configuration
// that provides a cluster the information needed to store and use encryption
// keys in the HSM. For more information, go to Hardware Security Modules (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-HSM.html)
// in the Amazon Redshift Cluster Management Guide.
//
// 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 Redshift's
// API operation CreateHsmClientCertificate for usage and error information.
//
// Returned Error Codes:
// * HsmClientCertificateAlreadyExistsFault
// There is already an existing Amazon Redshift HSM client certificate with
// the specified identifier.
//
// * HsmClientCertificateQuotaExceededFault
// The quota for HSM client certificates has been reached. For information about
// increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
//
// * TagLimitExceededFault
// The request exceeds the limit of 10 tags for the resource.
//
// * InvalidTagFault
// The tag is invalid.
//
func (c *Redshift) CreateHsmClientCertificate(input *CreateHsmClientCertificateInput) (*CreateHsmClientCertificateOutput, error) {
req, out := c.CreateHsmClientCertificateRequest(input)
err := req.Send()
return out, err
}
const opCreateHsmConfiguration = "CreateHsmConfiguration"
// CreateHsmConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the CreateHsmConfiguration operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateHsmConfiguration 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 CreateHsmConfiguration 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 CreateHsmConfigurationRequest method.
// req, resp := client.CreateHsmConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled