forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
9661 lines (8375 loc) · 326 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 cloudfront provides a client for Amazon CloudFront.
package cloudfront
import (
"fmt"
"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/restxml"
)
const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2016_09_29"
// CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
// client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateCloudFrontOriginAccessIdentity 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 CreateCloudFrontOriginAccessIdentity 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 CreateCloudFrontOriginAccessIdentityRequest method.
// req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) {
op := &request.Operation{
Name: opCreateCloudFrontOriginAccessIdentity,
HTTPMethod: "POST",
HTTPPath: "/2016-09-29/origin-access-identity/cloudfront",
}
if input == nil {
input = &CreateCloudFrontOriginAccessIdentityInput{}
}
req = c.newRequest(op, input, output)
output = &CreateCloudFrontOriginAccessIdentityOutput{}
req.Data = output
return
}
// CreateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
//
// Creates a new origin access identity. If you're using Amazon S3 for your
// origin, you can use an origin access identity to require users to access
// your content using a CloudFront URL instead of the Amazon S3 URL. For more
// information about how to use origin access identities, see Serving Private
// Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
// in the Amazon CloudFront 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 CloudFront's
// API operation CreateCloudFrontOriginAccessIdentity for usage and error information.
//
// Returned Error Codes:
// * OriginAccessIdentityAlreadyExists
// If the CallerReference is a value you already sent in a previous request
// to create an identity but the content of the CloudFrontOriginAccessIdentityConfig
// is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
// error.
//
// * MissingBody
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
//
// * TooManyCloudFrontOriginAccessIdentities
// Processing your request would cause you to exceed the maximum number of origin
// access identities allowed.
//
// * InvalidArgument
// The argument is invalid.
//
// * InconsistentQuantities
// The value of Quantity and the size of Items do not match.
//
func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) {
req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input)
err := req.Send()
return out, err
}
const opCreateDistribution = "CreateDistribution2016_09_29"
// CreateDistributionRequest generates a "aws/request.Request" representing the
// client's request for the CreateDistribution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateDistribution 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 CreateDistribution 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 CreateDistributionRequest method.
// req, resp := client.CreateDistributionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) {
op := &request.Operation{
Name: opCreateDistribution,
HTTPMethod: "POST",
HTTPPath: "/2016-09-29/distribution",
}
if input == nil {
input = &CreateDistributionInput{}
}
req = c.newRequest(op, input, output)
output = &CreateDistributionOutput{}
req.Data = output
return
}
// CreateDistribution API operation for Amazon CloudFront.
//
// Creates a new web distribution. Send a GET request to the /CloudFront API
// version/distribution/distribution ID resource.
//
// 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 CloudFront's
// API operation CreateDistribution for usage and error information.
//
// Returned Error Codes:
// * CNAMEAlreadyExists
//
// * DistributionAlreadyExists
// The caller reference you attempted to create the distribution with is associated
// with another distribution.
//
// * InvalidOrigin
// The Amazon S3 origin server specified does not refer to a valid Amazon S3
// bucket.
//
// * InvalidOriginAccessIdentity
// The origin access identity is not valid or doesn't exist.
//
// * AccessDenied
// Access denied.
//
// * TooManyTrustedSigners
// Your request contains more trusted signers than are allowed per distribution.
//
// * TrustedSignerDoesNotExist
// One or more of your trusted signers do not exist.
//
// * InvalidViewerCertificate
//
// * InvalidMinimumProtocolVersion
//
// * MissingBody
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
//
// * TooManyDistributionCNAMEs
// Your request contains more CNAMEs than are allowed per distribution.
//
// * TooManyDistributions
// Processing your request would cause you to exceed the maximum number of distributions
// allowed.
//
// * InvalidDefaultRootObject
// The default root object file name is too big or contains an invalid character.
//
// * InvalidRelativePath
// The relative path is too big, is not URL-encoded, or does not begin with
// a slash (/).
//
// * InvalidErrorCode
//
// * InvalidResponseCode
//
// * InvalidArgument
// The argument is invalid.
//
// * InvalidRequiredProtocol
// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
// protocol in your request, or omit the RequiredProtocols element from your
// distribution configuration.
//
// * NoSuchOrigin
// No origin exists with the specified Origin Id.
//
// * TooManyOrigins
// You cannot create more origins for the distribution.
//
// * TooManyCacheBehaviors
// You cannot create more cache behaviors for the distribution.
//
// * TooManyCookieNamesInWhiteList
// Your request contains more cookie names in the whitelist than are allowed
// per cache behavior.
//
// * InvalidForwardCookies
// Your request contains forward cookies option which doesn't match with the
// expectation for the whitelisted list of cookie names. Either list of cookie
// names has been specified when not allowed or list of cookie names is missing
// when expected.
//
// * TooManyHeadersInForwardedValues
//
// * InvalidHeadersForS3Origin
//
// * InconsistentQuantities
// The value of Quantity and the size of Items do not match.
//
// * TooManyCertificates
// You cannot create anymore custom SSL/TLS certificates.
//
// * InvalidLocationCode
//
// * InvalidGeoRestrictionParameter
//
// * InvalidProtocolSettings
// You cannot specify SSLv3 as the minimum protocol version if you only want
// to support only clients that support Server Name Indication (SNI).
//
// * InvalidTTLOrder
//
// * InvalidWebACLId
//
// * TooManyOriginCustomHeaders
//
// * TooManyQueryStringParameters
//
// * InvalidQueryStringParameters
//
func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) {
req, out := c.CreateDistributionRequest(input)
err := req.Send()
return out, err
}
const opCreateDistributionWithTags = "CreateDistributionWithTags2016_09_29"
// CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the
// client's request for the CreateDistributionWithTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateDistributionWithTags 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 CreateDistributionWithTags 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 CreateDistributionWithTagsRequest method.
// req, resp := client.CreateDistributionWithTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) {
op := &request.Operation{
Name: opCreateDistributionWithTags,
HTTPMethod: "POST",
HTTPPath: "/2016-09-29/distribution?WithTags",
}
if input == nil {
input = &CreateDistributionWithTagsInput{}
}
req = c.newRequest(op, input, output)
output = &CreateDistributionWithTagsOutput{}
req.Data = output
return
}
// CreateDistributionWithTags API operation for Amazon CloudFront.
//
// Create a new distribution with tags.
//
// 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 CloudFront's
// API operation CreateDistributionWithTags for usage and error information.
//
// Returned Error Codes:
// * CNAMEAlreadyExists
//
// * DistributionAlreadyExists
// The caller reference you attempted to create the distribution with is associated
// with another distribution.
//
// * InvalidOrigin
// The Amazon S3 origin server specified does not refer to a valid Amazon S3
// bucket.
//
// * InvalidOriginAccessIdentity
// The origin access identity is not valid or doesn't exist.
//
// * AccessDenied
// Access denied.
//
// * TooManyTrustedSigners
// Your request contains more trusted signers than are allowed per distribution.
//
// * TrustedSignerDoesNotExist
// One or more of your trusted signers do not exist.
//
// * InvalidViewerCertificate
//
// * InvalidMinimumProtocolVersion
//
// * MissingBody
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
//
// * TooManyDistributionCNAMEs
// Your request contains more CNAMEs than are allowed per distribution.
//
// * TooManyDistributions
// Processing your request would cause you to exceed the maximum number of distributions
// allowed.
//
// * InvalidDefaultRootObject
// The default root object file name is too big or contains an invalid character.
//
// * InvalidRelativePath
// The relative path is too big, is not URL-encoded, or does not begin with
// a slash (/).
//
// * InvalidErrorCode
//
// * InvalidResponseCode
//
// * InvalidArgument
// The argument is invalid.
//
// * InvalidRequiredProtocol
// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
// protocol in your request, or omit the RequiredProtocols element from your
// distribution configuration.
//
// * NoSuchOrigin
// No origin exists with the specified Origin Id.
//
// * TooManyOrigins
// You cannot create more origins for the distribution.
//
// * TooManyCacheBehaviors
// You cannot create more cache behaviors for the distribution.
//
// * TooManyCookieNamesInWhiteList
// Your request contains more cookie names in the whitelist than are allowed
// per cache behavior.
//
// * InvalidForwardCookies
// Your request contains forward cookies option which doesn't match with the
// expectation for the whitelisted list of cookie names. Either list of cookie
// names has been specified when not allowed or list of cookie names is missing
// when expected.
//
// * TooManyHeadersInForwardedValues
//
// * InvalidHeadersForS3Origin
//
// * InconsistentQuantities
// The value of Quantity and the size of Items do not match.
//
// * TooManyCertificates
// You cannot create anymore custom SSL/TLS certificates.
//
// * InvalidLocationCode
//
// * InvalidGeoRestrictionParameter
//
// * InvalidProtocolSettings
// You cannot specify SSLv3 as the minimum protocol version if you only want
// to support only clients that support Server Name Indication (SNI).
//
// * InvalidTTLOrder
//
// * InvalidWebACLId
//
// * TooManyOriginCustomHeaders
//
// * InvalidTagging
//
// * TooManyQueryStringParameters
//
// * InvalidQueryStringParameters
//
func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) {
req, out := c.CreateDistributionWithTagsRequest(input)
err := req.Send()
return out, err
}
const opCreateInvalidation = "CreateInvalidation2016_09_29"
// CreateInvalidationRequest generates a "aws/request.Request" representing the
// client's request for the CreateInvalidation operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateInvalidation 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 CreateInvalidation 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 CreateInvalidationRequest method.
// req, resp := client.CreateInvalidationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) {
op := &request.Operation{
Name: opCreateInvalidation,
HTTPMethod: "POST",
HTTPPath: "/2016-09-29/distribution/{DistributionId}/invalidation",
}
if input == nil {
input = &CreateInvalidationInput{}
}
req = c.newRequest(op, input, output)
output = &CreateInvalidationOutput{}
req.Data = output
return
}
// CreateInvalidation API operation for Amazon CloudFront.
//
// Create a new invalidation.
//
// 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 CloudFront's
// API operation CreateInvalidation for usage and error information.
//
// Returned Error Codes:
// * AccessDenied
// Access denied.
//
// * MissingBody
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
//
// * InvalidArgument
// The argument is invalid.
//
// * NoSuchDistribution
// The specified distribution does not exist.
//
// * BatchTooLarge
//
// * TooManyInvalidationsInProgress
// You have exceeded the maximum number of allowable InProgress invalidation
// batch requests, or invalidation objects.
//
// * InconsistentQuantities
// The value of Quantity and the size of Items do not match.
//
func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) {
req, out := c.CreateInvalidationRequest(input)
err := req.Send()
return out, err
}
const opCreateStreamingDistribution = "CreateStreamingDistribution2016_09_29"
// CreateStreamingDistributionRequest generates a "aws/request.Request" representing the
// client's request for the CreateStreamingDistribution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateStreamingDistribution 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 CreateStreamingDistribution 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 CreateStreamingDistributionRequest method.
// req, resp := client.CreateStreamingDistributionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) {
op := &request.Operation{
Name: opCreateStreamingDistribution,
HTTPMethod: "POST",
HTTPPath: "/2016-09-29/streaming-distribution",
}
if input == nil {
input = &CreateStreamingDistributionInput{}
}
req = c.newRequest(op, input, output)
output = &CreateStreamingDistributionOutput{}
req.Data = output
return
}
// CreateStreamingDistribution API operation for Amazon CloudFront.
//
// Creates a new RMTP distribution. An RTMP distribution is similar to a web
// distribution, but an RTMP distribution streams media files using the Adobe
// Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.
//
// To create a new web distribution, submit a POST request to the CloudFront
// API version/distribution resource. The request body must include a document
// with a StreamingDistributionConfig element. The response echoes the StreamingDistributionConfig
// element and returns other information about the RTMP distribution.
//
// To get the status of your request, use the GET StreamingDistribution API
// action. When the value of Enabled is true and the value of Status is Deployed,
// your distribution is ready. A distribution usually deploys in less than 15
// minutes.
//
// For more information about web distributions, see Working with RTMP Distributions
// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html)
// in the Amazon CloudFront Developer Guide.
//
// Beginning with the 2012-05-05 version of the CloudFront API, we made substantial
// changes to the format of the XML document that you include in the request
// body when you create or update a web distribution or an RTMP distribution,
// and when you invalidate objects. With previous versions of the API, we discovered
// that it was too easy to accidentally delete one or more values for an element
// that accepts multiple values, for example, CNAMEs and trusted signers. Our
// changes for the 2012-05-05 release are intended to prevent these accidental
// deletions and to notify you when there's a mismatch between the number of
// values you say you're specifying in the Quantity element and the number of
// values specified.
//
// 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 CloudFront's
// API operation CreateStreamingDistribution for usage and error information.
//
// Returned Error Codes:
// * CNAMEAlreadyExists
//
// * StreamingDistributionAlreadyExists
//
// * InvalidOrigin
// The Amazon S3 origin server specified does not refer to a valid Amazon S3
// bucket.
//
// * InvalidOriginAccessIdentity
// The origin access identity is not valid or doesn't exist.
//
// * AccessDenied
// Access denied.
//
// * TooManyTrustedSigners
// Your request contains more trusted signers than are allowed per distribution.
//
// * TrustedSignerDoesNotExist
// One or more of your trusted signers do not exist.
//
// * MissingBody
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
//
// * TooManyStreamingDistributionCNAMEs
//
// * TooManyStreamingDistributions
// Processing your request would cause you to exceed the maximum number of streaming
// distributions allowed.
//
// * InvalidArgument
// The argument is invalid.
//
// * InconsistentQuantities
// The value of Quantity and the size of Items do not match.
//
func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) {
req, out := c.CreateStreamingDistributionRequest(input)
err := req.Send()
return out, err
}
const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2016_09_29"
// CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the
// client's request for the CreateStreamingDistributionWithTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateStreamingDistributionWithTags 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 CreateStreamingDistributionWithTags 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 CreateStreamingDistributionWithTagsRequest method.
// req, resp := client.CreateStreamingDistributionWithTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) {
op := &request.Operation{
Name: opCreateStreamingDistributionWithTags,
HTTPMethod: "POST",
HTTPPath: "/2016-09-29/streaming-distribution?WithTags",
}
if input == nil {
input = &CreateStreamingDistributionWithTagsInput{}
}
req = c.newRequest(op, input, output)
output = &CreateStreamingDistributionWithTagsOutput{}
req.Data = output
return
}
// CreateStreamingDistributionWithTags API operation for Amazon CloudFront.
//
// Create a new streaming distribution with tags.
//
// 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 CloudFront's
// API operation CreateStreamingDistributionWithTags for usage and error information.
//
// Returned Error Codes:
// * CNAMEAlreadyExists
//
// * StreamingDistributionAlreadyExists
//
// * InvalidOrigin
// The Amazon S3 origin server specified does not refer to a valid Amazon S3
// bucket.
//
// * InvalidOriginAccessIdentity
// The origin access identity is not valid or doesn't exist.
//
// * AccessDenied
// Access denied.
//
// * TooManyTrustedSigners
// Your request contains more trusted signers than are allowed per distribution.
//
// * TrustedSignerDoesNotExist
// One or more of your trusted signers do not exist.
//
// * MissingBody
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
//
// * TooManyStreamingDistributionCNAMEs
//
// * TooManyStreamingDistributions
// Processing your request would cause you to exceed the maximum number of streaming
// distributions allowed.
//
// * InvalidArgument
// The argument is invalid.
//
// * InconsistentQuantities
// The value of Quantity and the size of Items do not match.
//
// * InvalidTagging
//
func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) {
req, out := c.CreateStreamingDistributionWithTagsRequest(input)
err := req.Send()
return out, err
}
const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2016_09_29"
// DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteCloudFrontOriginAccessIdentity 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 DeleteCloudFrontOriginAccessIdentity 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 DeleteCloudFrontOriginAccessIdentityRequest method.
// req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) {
op := &request.Operation{
Name: opDeleteCloudFrontOriginAccessIdentity,
HTTPMethod: "DELETE",
HTTPPath: "/2016-09-29/origin-access-identity/cloudfront/{Id}",
}
if input == nil {
input = &DeleteCloudFrontOriginAccessIdentityInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteCloudFrontOriginAccessIdentityOutput{}
req.Data = output
return
}
// DeleteCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
//
// Delete an origin access identity.
//
// 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 CloudFront's
// API operation DeleteCloudFrontOriginAccessIdentity for usage and error information.
//
// Returned Error Codes:
// * AccessDenied
// Access denied.
//
// * InvalidIfMatchVersion
// The If-Match version is missing or not valid for the distribution.
//
// * NoSuchCloudFrontOriginAccessIdentity
// The specified origin access identity does not exist.
//
// * PreconditionFailed
// The precondition given in one or more of the request-header fields evaluated
// to false.
//
// * OriginAccessIdentityInUse
//
func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) {
req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input)
err := req.Send()
return out, err
}
const opDeleteDistribution = "DeleteDistribution2016_09_29"
// DeleteDistributionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDistribution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteDistribution 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 DeleteDistribution 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 DeleteDistributionRequest method.
// req, resp := client.DeleteDistributionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) {
op := &request.Operation{
Name: opDeleteDistribution,
HTTPMethod: "DELETE",
HTTPPath: "/2016-09-29/distribution/{Id}",
}
if input == nil {
input = &DeleteDistributionInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteDistributionOutput{}
req.Data = output
return
}
// DeleteDistribution API operation for Amazon CloudFront.
//
// Delete a distribution.
//
// 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 CloudFront's
// API operation DeleteDistribution for usage and error information.
//
// Returned Error Codes:
// * AccessDenied
// Access denied.
//
// * DistributionNotDisabled
//
// * InvalidIfMatchVersion
// The If-Match version is missing or not valid for the distribution.
//
// * NoSuchDistribution
// The specified distribution does not exist.
//
// * PreconditionFailed
// The precondition given in one or more of the request-header fields evaluated
// to false.
//
func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) {
req, out := c.DeleteDistributionRequest(input)
err := req.Send()
return out, err
}
const opDeleteStreamingDistribution = "DeleteStreamingDistribution2016_09_29"
// DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteStreamingDistribution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteStreamingDistribution 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 DeleteStreamingDistribution 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 DeleteStreamingDistributionRequest method.
// req, resp := client.DeleteStreamingDistributionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) {
op := &request.Operation{
Name: opDeleteStreamingDistribution,
HTTPMethod: "DELETE",
HTTPPath: "/2016-09-29/streaming-distribution/{Id}",
}
if input == nil {
input = &DeleteStreamingDistributionInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteStreamingDistributionOutput{}
req.Data = output
return
}
// DeleteStreamingDistribution API operation for Amazon CloudFront.
//
// Delete a streaming distribution. To delete an RTMP distribution using the
// CloudFront API, perform the following steps.
//
// To delete an RTMP distribution using the CloudFront API:
//
// Disable the RTMP distribution.
//
// Submit a GET Streaming Distribution Config request to get the current configuration
// and the Etag header for the distribution.
//
// Update the XML document that was returned in the response to your GET Streaming
// Distribution Config request to change the value of Enabled to false.
//
// Submit a PUT Streaming Distribution Config request to update the configuration
// for your distribution. In the request body, include the XML document that
// you updated in Step 3. Then set the value of the HTTP If-Match header to
// the value of the ETag header that CloudFront returned when you submitted
// the GET Streaming Distribution Config request in Step 2.
//
// Review the response to the PUT Streaming Distribution Config request to confirm