forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
10517 lines (9348 loc) · 397 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 route53 provides a client for Amazon Route 53.
package route53
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone"
// AssociateVPCWithHostedZoneRequest generates a "aws/request.Request" representing the
// client's request for the AssociateVPCWithHostedZone operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AssociateVPCWithHostedZone 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 AssociateVPCWithHostedZone 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 AssociateVPCWithHostedZoneRequest method.
// req, resp := client.AssociateVPCWithHostedZoneRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) AssociateVPCWithHostedZoneRequest(input *AssociateVPCWithHostedZoneInput) (req *request.Request, output *AssociateVPCWithHostedZoneOutput) {
op := &request.Operation{
Name: opAssociateVPCWithHostedZone,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/hostedzone/{Id}/associatevpc",
}
if input == nil {
input = &AssociateVPCWithHostedZoneInput{}
}
req = c.newRequest(op, input, output)
output = &AssociateVPCWithHostedZoneOutput{}
req.Data = output
return
}
// AssociateVPCWithHostedZone API operation for Amazon Route 53.
//
// Associates an Amazon VPC with a private hosted zone.
//
// The VPC and the hosted zone must already exist, and you must have created
// a private hosted zone. You cannot convert a public hosted zone into a private
// hosted zone.
//
// Send a POST request to the /2013-04-01/hostedzone/hosted zone ID/associatevpc
// resource. The request body must include an XML document with a AssociateVPCWithHostedZoneRequest
// element. The response returns the AssociateVPCWithHostedZoneResponse element.
//
// If you used different accounts to create the hosted zone and to create
// the Amazon VPCs that you want to associate with the hosted zone, we need
// to update account permissions for you. For more information, see Associating
// Amazon VPCs and Private Hosted Zones That You Create with Different AWS Accounts
// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-associate-vpcs-different-accounts.html)
// in the Amazon Route 53 Developer 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 Route 53's
// API operation AssociateVPCWithHostedZone for usage and error information.
//
// Returned Error Codes:
// * NoSuchHostedZone
// No hosted zone exists with the ID that you specified.
//
// * InvalidVPCId
// The hosted zone you are trying to create for your VPC_ID does not belong
// to you. Amazon Route 53 returns this error when the VPC specified by VPCId
// does not belong to you.
//
// * InvalidInput
// The input is not valid.
//
// * PublicZoneVPCAssociation
// The hosted zone specified in HostedZoneId is a public hosted zone.
//
// * ConflictingDomainExists
// You specified an Amazon VPC that you're already using for another hosted
// zone, and the domain that you specified for one of the hosted zones is a
// subdomain of the domain that you specified for the other hosted zone. For
// example, you cannot use the same Amazon VPC for the hosted zones for example.com
// and test.example.com.
//
// * LimitsExceeded
// The limits specified for a resource have been exceeded.
//
func (c *Route53) AssociateVPCWithHostedZone(input *AssociateVPCWithHostedZoneInput) (*AssociateVPCWithHostedZoneOutput, error) {
req, out := c.AssociateVPCWithHostedZoneRequest(input)
err := req.Send()
return out, err
}
const opChangeResourceRecordSets = "ChangeResourceRecordSets"
// ChangeResourceRecordSetsRequest generates a "aws/request.Request" representing the
// client's request for the ChangeResourceRecordSets operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ChangeResourceRecordSets 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 ChangeResourceRecordSets 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 ChangeResourceRecordSetsRequest method.
// req, resp := client.ChangeResourceRecordSetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSetsInput) (req *request.Request, output *ChangeResourceRecordSetsOutput) {
op := &request.Operation{
Name: opChangeResourceRecordSets,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/hostedzone/{Id}/rrset/",
}
if input == nil {
input = &ChangeResourceRecordSetsInput{}
}
req = c.newRequest(op, input, output)
output = &ChangeResourceRecordSetsOutput{}
req.Data = output
return
}
// ChangeResourceRecordSets API operation for Amazon Route 53.
//
// Create, change, update, or delete authoritative DNS information on all Amazon
// Route 53 servers. Send a POST request to:
//
// /2013-04-01/hostedzone/Amazon Route 53 hosted Zone ID/rrset resource.
//
// The request body must include a document with a ChangeResourceRecordSetsRequest
// element. The request body contains a list of change items, known as a change
// batch. Change batches are considered transactional changes. When using the
// Amazon Route 53 API to change resource record sets, Amazon Route 53 either
// makes all or none of the changes in a change batch request. This ensures
// that Amazon Route 53 never partially implements the intended changes to the
// resource record sets in a hosted zone.
//
// For example, a change batch request that deletes the CNAME record for www.example.com
// and creates an alias resource record set for www.example.com. Amazon Route
// 53 deletes the first resource record set and creates the second resource
// record set in a single operation. If either the DELETE or the CREATE action
// fails, then both changes (plus any other changes in the batch) fail, and
// the original CNAME record continues to exist.
//
// Due to the nature of transactional changes, you cannot delete the same
// resource record set more than once in a single change batch. If you attempt
// to delete the same change batch more than once, Amazon Route 53 returns an
// InvalidChangeBatch error.
//
// To create resource record sets for complex routing configurations, use
// either the traffic flow visual editor in the Amazon Route 53 console or the
// API actions for traffic policies and traffic policy instances. Save the configuration
// as a traffic policy, then associate the traffic policy with one or more domain
// names (such as example.com) or subdomain names (such as www.example.com),
// in the same hosted zone or in multiple hosted zones. You can roll back the
// updates if the new configuration isn't performing as expected. For more information,
// see Using Traffic Flow to Route DNS Traffic (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html)
// in the Amazon Route 53 Developer Guide.
//
// Use ChangeResourceRecordsSetsRequest to perform the following actions:
//
// CREATE: Creates a resource record set that has the specified values.
//
// DELETE: Deletes an existing resource record set that has the specified
// values for Name, Type, Set Identifier (for code latency, weighted, geolocation,
// and failover resource record sets), and TTL (except alias resource record
// sets, for which the TTL is determined by the AWS resource you're routing
// queries to).
//
// UPSERT: If a resource record set does not already exist, AWS creates
// it. If a resource set does exist, Amazon Route 53 updates it with the values
// in the request. Amazon Route 53 can update an existing resource record set
// only when all of the following values match: Name, Type, and Set Identifier
// (for weighted, latency, geolocation, and failover resource record sets).
//
// In response to a ChangeResourceRecordSets request, the DNS data is changed
// on all Amazon Route 53 DNS servers. Initially, the status of a change is
// PENDING, meaning the change has not yet propagated to all the authoritative
// Amazon Route 53 DNS servers. When the change is propagated to all hosts,
// the change returns a status of INSYNC.
//
// After sending a change request, confirm your change has propagated to all
// Amazon Route 53 DNS servers. Changes generally propagate to all Amazon Route
// 53 name servers in a few minutes. In rare circumstances, propagation can
// take up to 30 minutes. For more information, see GetChange.
//
// For information about the limits on a ChangeResourceRecordSets request,
// see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer 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 Route 53's
// API operation ChangeResourceRecordSets for usage and error information.
//
// Returned Error Codes:
// * NoSuchHostedZone
// No hosted zone exists with the ID that you specified.
//
// * NoSuchHealthCheck
// No health check exists with the ID that you specified in the DeleteHealthCheck
// request.
//
// * InvalidChangeBatch
// This exception contains a list of messages that might contain one or more
// error messages. Each error message indicates one error in the change batch.
//
// * InvalidInput
// The input is not valid.
//
// * PriorRequestNotComplete
// If Amazon Route 53 can't process a request before the next request arrives,
// it will reject subsequent requests for the same hosted zone and return an
// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly
// for the same request, we recommend that you wait, in intervals of increasing
// duration, before you try the request again.
//
func (c *Route53) ChangeResourceRecordSets(input *ChangeResourceRecordSetsInput) (*ChangeResourceRecordSetsOutput, error) {
req, out := c.ChangeResourceRecordSetsRequest(input)
err := req.Send()
return out, err
}
const opChangeTagsForResource = "ChangeTagsForResource"
// ChangeTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ChangeTagsForResource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ChangeTagsForResource 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 ChangeTagsForResource 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 ChangeTagsForResourceRequest method.
// req, resp := client.ChangeTagsForResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput) (req *request.Request, output *ChangeTagsForResourceOutput) {
op := &request.Operation{
Name: opChangeTagsForResource,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/tags/{ResourceType}/{ResourceId}",
}
if input == nil {
input = &ChangeTagsForResourceInput{}
}
req = c.newRequest(op, input, output)
output = &ChangeTagsForResourceOutput{}
req.Data = output
return
}
// ChangeTagsForResource API operation for Amazon Route 53.
//
// Adds, edits, or deletes tags for a health check or a hosted zone.
//
// For information about using tags for cost allocation, see Using Cost Allocation
// Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
// in the AWS Billing and Cost Management User 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 Route 53's
// API operation ChangeTagsForResource for usage and error information.
//
// Returned Error Codes:
// * InvalidInput
// The input is not valid.
//
// * NoSuchHealthCheck
// No health check exists with the ID that you specified in the DeleteHealthCheck
// request.
//
// * NoSuchHostedZone
// No hosted zone exists with the ID that you specified.
//
// * PriorRequestNotComplete
// If Amazon Route 53 can't process a request before the next request arrives,
// it will reject subsequent requests for the same hosted zone and return an
// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly
// for the same request, we recommend that you wait, in intervals of increasing
// duration, before you try the request again.
//
// * ThrottlingException
//
func (c *Route53) ChangeTagsForResource(input *ChangeTagsForResourceInput) (*ChangeTagsForResourceOutput, error) {
req, out := c.ChangeTagsForResourceRequest(input)
err := req.Send()
return out, err
}
const opCreateHealthCheck = "CreateHealthCheck"
// CreateHealthCheckRequest generates a "aws/request.Request" representing the
// client's request for the CreateHealthCheck operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateHealthCheck 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 CreateHealthCheck 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 CreateHealthCheckRequest method.
// req, resp := client.CreateHealthCheckRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) CreateHealthCheckRequest(input *CreateHealthCheckInput) (req *request.Request, output *CreateHealthCheckOutput) {
op := &request.Operation{
Name: opCreateHealthCheck,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/healthcheck",
}
if input == nil {
input = &CreateHealthCheckInput{}
}
req = c.newRequest(op, input, output)
output = &CreateHealthCheckOutput{}
req.Data = output
return
}
// CreateHealthCheck API operation for Amazon Route 53.
//
// Creates a new health check.
//
// To create a new health check, send a POST request to the /2013-04-01/healthcheck
// resource. The request body must include an XML document with a CreateHealthCheckRequest
// element. The response returns the CreateHealthCheckResponse element, containing
// the health check ID specified when adding health check to a resource record
// set. For information about adding health checks to resource record sets,
// see ResourceRecordSet$HealthCheckId in ChangeResourceRecordSets.
//
// If you are registering Amazon EC2 instances with an Elastic Load Balancing
// (ELB) load balancer, do not create Amazon Route 53 health checks for the
// Amazon EC2 instances. When you register an Amazon EC2 instance with a load
// balancer, you configure settings for an ELB health check, which performs
// a similar function to an Amazon Route 53 health check.
//
// You can associate health checks with failover resource record sets in a
// private hosted zone. Note the following:
//
// Amazon Route 53 health checkers are outside the VPC. To check the health
// of an endpoint within a VPC by IP address, you must assign a public IP address
// to the instance in the VPC.
//
// You can configure a health checker to check the health of an external
// resource that the instance relies on, such as a database server.
//
// You can create a CloudWatch metric, associate an alarm with the metric,
// and then create a health check that is based on the state of the alarm. For
// example, you might create a CloudWatch metric that checks the status of the
// Amazon EC2 StatusCheckFailed metric, add an alarm to the metric, and then
// create a health check that is based on the state of the alarm. For information
// about creating CloudWatch metrics and alarms by using the CloudWatch console,
// see the Amazon CloudWatch Developer Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html).
//
// 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 Route 53's
// API operation CreateHealthCheck for usage and error information.
//
// Returned Error Codes:
// * TooManyHealthChecks
// You have reached the maximum number of active health checks for an AWS account.
// The default limit is 100. To request a higher limit, create a case (http://aws.amazon.com/route53-request)
// with the AWS Support Center.
//
// * HealthCheckAlreadyExists
// The health check you're attempting to create already exists.
//
// Amazon Route 53 returns this error when a health check has already been
// created with the specified value for CallerReference.
//
// * InvalidInput
// The input is not valid.
//
func (c *Route53) CreateHealthCheck(input *CreateHealthCheckInput) (*CreateHealthCheckOutput, error) {
req, out := c.CreateHealthCheckRequest(input)
err := req.Send()
return out, err
}
const opCreateHostedZone = "CreateHostedZone"
// CreateHostedZoneRequest generates a "aws/request.Request" representing the
// client's request for the CreateHostedZone operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateHostedZone 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 CreateHostedZone 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 CreateHostedZoneRequest method.
// req, resp := client.CreateHostedZoneRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *request.Request, output *CreateHostedZoneOutput) {
op := &request.Operation{
Name: opCreateHostedZone,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/hostedzone",
}
if input == nil {
input = &CreateHostedZoneInput{}
}
req = c.newRequest(op, input, output)
output = &CreateHostedZoneOutput{}
req.Data = output
return
}
// CreateHostedZone API operation for Amazon Route 53.
//
// Creates a new public hosted zone, used to specify how the Domain Name System
// (DNS) routes traffic on the Internet for a domain, such as example.com, and
// its subdomains.
//
// Public hosted zones cannot be converted to a private hosted zone or vice
// versa. Instead, create a new hosted zone with the same name and create new
// resource record sets.
//
// Send a POST request to the /2013-04-01/hostedzone resource. The request
// body must include an XML document with a CreateHostedZoneRequest element.
// The response returns the CreateHostedZoneResponse element containing metadata
// about the hosted zone.
//
// Fore more information about charges for hosted zones, see Amazon Route 53
// Pricing (http://aws.amazon.com/route53/pricing/).
//
// Note the following:
//
// You cannot create a hosted zone for a top-level domain (TLD).
//
// Amazon Route 53 automatically creates a default SOA record and four NS
// records for the zone. For more information about SOA and NS records, see
// NS and SOA Records that Amazon Route 53 Creates for a Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html)
// in the Amazon Route 53 Developer Guide.
//
// If your domain is registered with a registrar other than Amazon Route
// 53, you must update the name servers with your registrar to make Amazon Route
// 53 your DNS service. For more information, see Configuring Amazon Route 53
// as your DNS Service (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/creating-migrating.html)
// in the Amazon Route 53 Developer's Guide.
//
// After creating a zone, its initial status is PENDING. This means that
// it is not yet available on all DNS servers. The status of the zone changes
// to INSYNC when the NS and SOA records are available on all Amazon Route 53
// DNS servers.
//
// When trying to create a hosted zone using a reusable delegation set, specify
// an optional DelegationSetId, and Amazon Route 53 would assign those 4 NS
// records for the zone, instead of allotting a new one.
//
// 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 Route 53's
// API operation CreateHostedZone for usage and error information.
//
// Returned Error Codes:
// * InvalidDomainName
// The specified domain name is not valid.
//
// * HostedZoneAlreadyExists
// The hosted zone you are trying to create already exists. Amazon Route 53
// returns this error when a hosted zone has already been created with the specified
// CallerReference.
//
// * TooManyHostedZones
// This hosted zone cannot be created because the hosted zone limit is exceeded.
// To request a limit increase, go to the Amazon Route 53 Contact Us (http://aws.amazon.com/route53-request/)
// page.
//
// * InvalidVPCId
// The hosted zone you are trying to create for your VPC_ID does not belong
// to you. Amazon Route 53 returns this error when the VPC specified by VPCId
// does not belong to you.
//
// * InvalidInput
// The input is not valid.
//
// * DelegationSetNotAvailable
// You can create a hosted zone that has the same name as an existing hosted
// zone (example.com is common), but there is a limit to the number of hosted
// zones that have the same name. If you get this error, Amazon Route 53 has
// reached that limit. If you own the domain name and Amazon Route 53 generates
// this error, contact Customer Support.
//
// * ConflictingDomainExists
// You specified an Amazon VPC that you're already using for another hosted
// zone, and the domain that you specified for one of the hosted zones is a
// subdomain of the domain that you specified for the other hosted zone. For
// example, you cannot use the same Amazon VPC for the hosted zones for example.com
// and test.example.com.
//
// * NoSuchDelegationSet
// A reusable delegation set with the specified ID does not exist.
//
// * DelegationSetNotReusable
// A reusable delegation set with the specified ID does not exist.
//
func (c *Route53) CreateHostedZone(input *CreateHostedZoneInput) (*CreateHostedZoneOutput, error) {
req, out := c.CreateHostedZoneRequest(input)
err := req.Send()
return out, err
}
const opCreateReusableDelegationSet = "CreateReusableDelegationSet"
// CreateReusableDelegationSetRequest generates a "aws/request.Request" representing the
// client's request for the CreateReusableDelegationSet operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateReusableDelegationSet 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 CreateReusableDelegationSet 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 CreateReusableDelegationSetRequest method.
// req, resp := client.CreateReusableDelegationSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) CreateReusableDelegationSetRequest(input *CreateReusableDelegationSetInput) (req *request.Request, output *CreateReusableDelegationSetOutput) {
op := &request.Operation{
Name: opCreateReusableDelegationSet,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/delegationset",
}
if input == nil {
input = &CreateReusableDelegationSetInput{}
}
req = c.newRequest(op, input, output)
output = &CreateReusableDelegationSetOutput{}
req.Data = output
return
}
// CreateReusableDelegationSet API operation for Amazon Route 53.
//
// Creates a delegation set (a group of four name servers) that can be reused
// by multiple hosted zones. If a hosted zoned ID is specified, CreateReusableDelegationSet
// marks the delegation set associated with that zone as reusable
//
// Send a POST request to the /2013-04-01/delegationset resource. The request
// body must include an XML document with a CreateReusableDelegationSetRequest
// element.
//
// A reusable delegation set cannot be associated with a private hosted zone/
//
// For more information, including a procedure on how to create and configure
// a reusable delegation set (also known as white label name servers), see Configuring
// White Label Name Servers (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html).
//
// 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 Route 53's
// API operation CreateReusableDelegationSet for usage and error information.
//
// Returned Error Codes:
// * DelegationSetAlreadyCreated
// A delegation set with the same owner and caller reference combination has
// already been created.
//
// * LimitsExceeded
// The limits specified for a resource have been exceeded.
//
// * HostedZoneNotFound
// The specified HostedZone cannot be found.
//
// * InvalidArgument
// Parameter name and problem.
//
// * InvalidInput
// The input is not valid.
//
// * DelegationSetNotAvailable
// You can create a hosted zone that has the same name as an existing hosted
// zone (example.com is common), but there is a limit to the number of hosted
// zones that have the same name. If you get this error, Amazon Route 53 has
// reached that limit. If you own the domain name and Amazon Route 53 generates
// this error, contact Customer Support.
//
// * DelegationSetAlreadyReusable
// The specified delegation set has already been marked as reusable.
//
func (c *Route53) CreateReusableDelegationSet(input *CreateReusableDelegationSetInput) (*CreateReusableDelegationSetOutput, error) {
req, out := c.CreateReusableDelegationSetRequest(input)
err := req.Send()
return out, err
}
const opCreateTrafficPolicy = "CreateTrafficPolicy"
// CreateTrafficPolicyRequest generates a "aws/request.Request" representing the
// client's request for the CreateTrafficPolicy operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateTrafficPolicy 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 CreateTrafficPolicy 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 CreateTrafficPolicyRequest method.
// req, resp := client.CreateTrafficPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) CreateTrafficPolicyRequest(input *CreateTrafficPolicyInput) (req *request.Request, output *CreateTrafficPolicyOutput) {
op := &request.Operation{
Name: opCreateTrafficPolicy,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/trafficpolicy",
}
if input == nil {
input = &CreateTrafficPolicyInput{}
}
req = c.newRequest(op, input, output)
output = &CreateTrafficPolicyOutput{}
req.Data = output
return
}
// CreateTrafficPolicy API operation for Amazon Route 53.
//
// Creates a traffic policy, which you use to create multiple DNS resource record
// sets for one domain name (such as example.com) or one subdomain name (such
// as www.example.com).
//
// Send a POST request to the /2013-04-01/trafficpolicy resource. The request
// body must include a document with a CreateTrafficPolicyRequest element. The
// response includes the CreateTrafficPolicyResponse element, which contains
// information about the new traffic policy.
//
// 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 Route 53's
// API operation CreateTrafficPolicy for usage and error information.
//
// Returned Error Codes:
// * InvalidInput
// The input is not valid.
//
// * TooManyTrafficPolicies
// You've created the maximum number of traffic policies that can be created
// for the current AWS account. You can request an increase to the limit on
// the Contact Us (http://aws.amazon.com/route53-request/) page.
//
// * TrafficPolicyAlreadyExists
// A traffic policy that has the same value for Name already exists.
//
// * InvalidTrafficPolicyDocument
// The format of the traffic policy document that you specified in the Document
// element is invalid.
//
func (c *Route53) CreateTrafficPolicy(input *CreateTrafficPolicyInput) (*CreateTrafficPolicyOutput, error) {
req, out := c.CreateTrafficPolicyRequest(input)
err := req.Send()
return out, err
}
const opCreateTrafficPolicyInstance = "CreateTrafficPolicyInstance"
// CreateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the
// client's request for the CreateTrafficPolicyInstance operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateTrafficPolicyInstance 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 CreateTrafficPolicyInstance 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 CreateTrafficPolicyInstanceRequest method.
// req, resp := client.CreateTrafficPolicyInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) CreateTrafficPolicyInstanceRequest(input *CreateTrafficPolicyInstanceInput) (req *request.Request, output *CreateTrafficPolicyInstanceOutput) {
op := &request.Operation{
Name: opCreateTrafficPolicyInstance,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/trafficpolicyinstance",
}
if input == nil {
input = &CreateTrafficPolicyInstanceInput{}
}
req = c.newRequest(op, input, output)
output = &CreateTrafficPolicyInstanceOutput{}
req.Data = output
return
}
// CreateTrafficPolicyInstance API operation for Amazon Route 53.
//
// Creates resource record sets in a specified hosted zone based on the settings
// in a specified traffic policy version. In addition, CreateTrafficPolicyInstance
// associates the resource record sets with a specified domain name (such as
// example.com) or subdomain name (such as www.example.com). Amazon Route 53
// responds to DNS queries for the domain or subdomain name by using the resource
// record sets that CreateTrafficPolicyInstance created.
//
// Send a POST request to the /2013-04-01/trafficpolicyinstance resource. The
// request body must include a document with a CreateTrafficPolicyRequest element.
// The response returns the CreateTrafficPolicyInstanceResponse element, which
// contains information about the traffic policy instance.
//
// 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 Route 53's
// API operation CreateTrafficPolicyInstance for usage and error information.
//
// Returned Error Codes:
// * NoSuchHostedZone
// No hosted zone exists with the ID that you specified.
//
// * InvalidInput
// The input is not valid.
//
// * TooManyTrafficPolicyInstances
// You've created the maximum number of traffic policy instances that can be
// created for the current AWS account. You can request an increase to the limit
// on the Contact Us (http://aws.amazon.com/route53-request/) page.
//
// * NoSuchTrafficPolicy
// No traffic policy exists with the specified ID.
//
// * TrafficPolicyInstanceAlreadyExists
// Traffic policy instance with given Id already exists.
//
func (c *Route53) CreateTrafficPolicyInstance(input *CreateTrafficPolicyInstanceInput) (*CreateTrafficPolicyInstanceOutput, error) {
req, out := c.CreateTrafficPolicyInstanceRequest(input)
err := req.Send()
return out, err
}
const opCreateTrafficPolicyVersion = "CreateTrafficPolicyVersion"
// CreateTrafficPolicyVersionRequest generates a "aws/request.Request" representing the
// client's request for the CreateTrafficPolicyVersion operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateTrafficPolicyVersion 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 CreateTrafficPolicyVersion 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 CreateTrafficPolicyVersionRequest method.
// req, resp := client.CreateTrafficPolicyVersionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) CreateTrafficPolicyVersionRequest(input *CreateTrafficPolicyVersionInput) (req *request.Request, output *CreateTrafficPolicyVersionOutput) {
op := &request.Operation{
Name: opCreateTrafficPolicyVersion,
HTTPMethod: "POST",
HTTPPath: "/2013-04-01/trafficpolicy/{Id}",
}
if input == nil {
input = &CreateTrafficPolicyVersionInput{}
}
req = c.newRequest(op, input, output)
output = &CreateTrafficPolicyVersionOutput{}
req.Data = output
return
}
// CreateTrafficPolicyVersion API operation for Amazon Route 53.
//
// Creates a new version of an existing traffic policy. When you create a new
// version of a traffic policy, you specify the ID of the traffic policy that
// you want to update and a JSON-formatted document that describes the new version.
// You use traffic policies to create multiple DNS resource record sets for
// one domain name (such as example.com) or one subdomain name (such as www.example.com).
// You can create a maximum of 1000 versions of a traffic policy. If you reach
// the limit and need to create another version, you'll need to start a new
// traffic policy.
//
// Send a POST request to the /2013-04-01/trafficpolicy/ resource. The request
// body includes a document with a CreateTrafficPolicyVersionRequest element.
// The response returns the CreateTrafficPolicyVersionResponse element, which
// contains information about the new version of the traffic policy.
//
// 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 Route 53's
// API operation CreateTrafficPolicyVersion for usage and error information.
//
// Returned Error Codes:
// * NoSuchTrafficPolicy
// No traffic policy exists with the specified ID.
//
// * InvalidInput
// The input is not valid.
//
// * ConcurrentModification
// Another user submitted a request to update the object at the same time that
// you did. Retry the request.
//
// * InvalidTrafficPolicyDocument
// The format of the traffic policy document that you specified in the Document
// element is invalid.
//
func (c *Route53) CreateTrafficPolicyVersion(input *CreateTrafficPolicyVersionInput) (*CreateTrafficPolicyVersionOutput, error) {
req, out := c.CreateTrafficPolicyVersionRequest(input)
err := req.Send()
return out, err
}
const opDeleteHealthCheck = "DeleteHealthCheck"
// DeleteHealthCheckRequest generates a "aws/request.Request" representing the
// client's request for the DeleteHealthCheck operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteHealthCheck 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 DeleteHealthCheck 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 DeleteHealthCheckRequest method.
// req, resp := client.DeleteHealthCheckRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *Route53) DeleteHealthCheckRequest(input *DeleteHealthCheckInput) (req *request.Request, output *DeleteHealthCheckOutput) {
op := &request.Operation{
Name: opDeleteHealthCheck,
HTTPMethod: "DELETE",
HTTPPath: "/2013-04-01/healthcheck/{HealthCheckId}",
}
if input == nil {
input = &DeleteHealthCheckInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteHealthCheckOutput{}
req.Data = output
return
}
// DeleteHealthCheck API operation for Amazon Route 53.
//
// Deletes a health check. Send a DELETE request to the /2013-04-01/healthcheck/health
// check ID resource.
//
// Amazon Route 53 does not prevent you from deleting a health check even
// if the health check is associated with one or more resource record sets.
// If you delete a health check and you don't update the associated resource
// record sets, the future status of the health check cannot be predicted and
// may change. This will affect the routing of DNS queries for your DNS failover